mozart - Why doesn't "for X in E1..E2;E3 do" work in Oz? -
i'm using mozart 2.0.0 , i'm following these docs: http://mozart.github.io/mozart-v1/doc-1.4.0/loop/node1.html#chapter.official
i'm guessing loop syntax has changed or something, because parse error when following documentation exactly:
x in e1..e2;e3
my attempt:
for x in 5..1;-1 {browse x} end
i got work more verbose syntax:
for x in ({length l};x > 0;x - 1) {browse x} end
but first example seems way more readable , less error prone me. why doesn't work?
i did not test 2.0.0, in 1.4.0 works if replace -
~
.
it's bit of unusual oz syntax: unary minus sign ~
.
-
used binary minus.
Comments
Post a Comment