[REBOL] Re: x: :y question
From: rebolek:seznam:cz at: 4-Feb-2003 9:38
Thanks Joel and Ladislav.
I had an idea: I need to sroll some face up or down, left or right
depending on some value.
I can use something like:
either x < 0 [a: a + 1][a: a - 1]
so I thought I can make it more REBOLish ;), something like:
op: either x < 0 [:+][:-]
a: a op 1
This does not work, OK.
But I cannot use even 'alias, becease aliased word cannot be changed :(
and that's sad :((
alias: either x < 0 ['+]['-] "op"
a: a op 1
This works only once, then I've got this error:
** Script Error: Alias word is already in use: op
** Near: alias either x < 1
ok, I'll use my old code.
But Joel, what does mean your:
>> (+ 1 2)
== 3
?
I can't reproduce it, for me, it's always
>> (+ 1 2)
>>
(nothing happens, because type? (+ 1 2) is op!)
bolek