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

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -