mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
49 lines
620 B
Text
49 lines
620 B
Text
var i:=3;
|
|
while (--i>0)
|
|
print("while");
|
|
endwhile
|
|
print(i);
|
|
|
|
for (i:=3;i>0;--i)
|
|
print("for");
|
|
endfor
|
|
print(i);
|
|
print(--i);
|
|
|
|
i:=3;
|
|
function p(i)
|
|
print("in func after --");
|
|
print(i);
|
|
--i;
|
|
endfunction
|
|
p(--i);
|
|
print("i after func call "+cstr(i));
|
|
|
|
i:=3;
|
|
function pp(byref i)
|
|
print("in func after --");
|
|
print(i);
|
|
--i;
|
|
endfunction
|
|
pp(--i);
|
|
print("i after func call "+cstr(i));
|
|
|
|
var ii:=--i;
|
|
print(ii);
|
|
ii-=--i;
|
|
print(ii);
|
|
ii:=1-(--i);
|
|
print(ii);
|
|
|
|
var d:=1.5;
|
|
print(--d);
|
|
|
|
const c:=1;
|
|
--c;
|
|
print("should not change {}".format(c));
|
|
print("should change {}".format(--c));
|
|
|
|
var e:={1};
|
|
print(--e);
|
|
--e[1];
|
|
print(e);
|