#============================================================ $define initialized_empty :=:tempty):=((/tempty&[])|tempty) $define let (
procedure main()
# full expression examples
writes("expression is >",(x:=:s):=((/s&"first goes,")|s),"< ")
write("and x is >",x,"<")
writes("expression is >",(x:=:s):=((/s&"second doesn't")|s),"< ") write("and x is >",x,"<")
# macro examples
x:=&null
writes("before first execution x=",image(x))
writes(", expression is ",image(let x initialized_empty) )
write(", after execution x is ",image(x),".") x:=[1]
writes("before second execution x=",image(x))
writes(", expression is ",image(let x initialized_empty) )
write(", after execution x is ",image(x),".")end
#=================================================
Output with wiconix
=====================================================
expression is >first goes,< and x is >first goes,<
expression is >first goes,< and x is >first goes,<
before first execution x=&null, expression is list_1(0), after execution x is list_1(0).
before second execution x=list_3(1), expression is list_3(1), after execution x is list_3(1).
#=================================================
Output with nticonix is almost the same, but in last line, it is list_2 instead of list_3. Even if I catch window output with my Scite editor, it is list_2. Same wicont and nticont. Where that list gone if window is opened?
----
Kazimir Majorinc, Zagreb, Croatia
