oz - How to use absolute values in Mozart? -
i'm trying absolute value of expression z=:x-y
it's not working. here 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 know i'm doing wrong , how fix it.
i noticed things: in first line can omit pso
, declaring writing body. can't understand code @ all, abs function, have write w = {abs z}
obtain absolute value of z
in w
. compiles, it's not clear me goal is. hope helped.
Comments
Post a Comment