[REBOL] Re: if and parens
From: g:santilli:tiscalinet:it at: 6-Oct-2002 12:11
Hi Laurent,
On Saturday, October 5, 2002, 11:30:50 PM, you wrote:
LG> Would anyone have an explanation ?
The problem is that infix operators are almost an hack in REBOL.
If you write your code as:
if 'file = get in info? to-file elt 'type [print elt]
it doesn't need parens; also, you never need them if you use
prefix operators, such as writing:
if equal? get in info? to-file elt 'type 'file [print elt]
The problem is that when you write:
get in info? to-file elt 'type = 'file
REBOL interprets it as:
get in info? to-file elt ('type = 'file)
HTH,
Gabriele.
--
Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer
Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r