0

I'm trying to get an absolute value of expression Z=:X-Y but it's not working. Here is my code:

declare PSO
proc {PSO W}
   X Y Z W
in
   X=5
   Y=2

   Z=:Y-X
   W=:Abs(Z)

   W=w(w:W)
   {FD.distribute ff W}
end
{ExploreOne PSO}

I would like to know what I'm doing wrong and how to fix it.

always_bloo
  • 165
  • 5
  • 13

1 Answers1

0

I noticed some things: In the first line you can omit PSO, as you are declaring it writing its body. I can't understand your code at all, but Abs is a function, so you have to write W = {Abs Z} to obtain the absolute value of Z in W. Now it compiles, but it's not clear to me what your goal is. Hope it helped.

rok
  • 2,574
  • 3
  • 23
  • 44