thanks.
In fact it was already loaded, but still same error:
?- use_module(library(clpfd)). X < 10 , X > 0 , integer(X), X = 3,Y < 10 , Y > 0 , X mod Y = 0 , X / Y = 2 .
ERROR: </2: Arguments are not sufficiently instantiated
OK, but
1) if I want it to solve X as an integer unknown to solve, how can I give value to X ?!
2) imagine I want to initiate X with 3, so :
X < 10 , X > 0 , integer(X), X = 3,Y < 10 , Y > 0 , X mod Y = 0 , X / Y = 2 .
but :
ERROR: </2: Arguments are not sufficiently instantiated ?
So where...
Hi,
Why
X < 10 , X > 0 , integer(X), integer(Y),Y < 10 , Y > 0 , X mod Y = 0 , X / Y = 2 .
does give
ERROR: </2: Arguments are not sufficiently instantiated ?
Hi,
In swiprolog, when
[library(clpfd)].
X in 0..10 , Y in 0..10 , X mod Y #= 0 , X / Y #=2 .
It gives
X in 2..10,
X/Y#=2,
X mod Y#=0,
Y in 1..10.
But it's not very useful if I don't have couples of solutions, i.e. for X=2 -> Y=1 etc...
So how can I have the different couples?
hi,
I wondered how to declare a tempory matrix saving variable: must it have same intent() parameters than the parent one it's related to?
For instance:
"program paramMat
! gfortran paraMatrix.f90 -o paraMatrix
implicit none
integer, parameter :: dim = 4
real, dimension(dim,dim) ::a
call...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.