, .
, .
:word get-word! get 'word. ,
do get 'multiply 3 4
multiply - word! Rebol.
do - , Rebol.
do, /ββ, do. :
perform: func [ code [block!]] [ if equal? code [ 1 ] [ print "Hello" ] ]
perform , . "" , , , ( "" ), 1.
perform [ multiply 3 4 ]
, code 1.
-, block!, 1.
>> perform [ 1 ]
Hello
:
perform: func [ code [block!]] [ if equal? code [ multiply 3 4 ] [ 42 ] ]
perform, -.
>> perform [ multiply 3 4 ]
== 42
do , , do, - .
This switching between dialects is a normal way of writing Rebol code, a good example of which is dialect parse
parse [ 1 2.4 3 ] [ some number! ]
which has its own syntax and even reuses existing dodialect words, such as skip, but with a different meaning.
johnk source
share