[REBOL] Re: Parsing comment
From: al:bri:xtra at: 25-Sep-2002 18:09
Carl Read wrote:
> (Or can we write operators, for that matter.) ...
>
> >> + 1 2
> == 3
> >> 1 + 2
> == 3
>
> >> sum: func [a b][a + b]
> >> sum 1 2
> == 3
> >> 1 sum 2
> ** Script Error: sum is missing its b argument
> ** Near: sum 2
>
> Can it be done?
We can do something like it (acknowledgements to Gabriele):
!=: get first [<>]
And use it like:
>> 0 != 2
== true
>> 4 != 4
== false
But I don't know how to make other infix operator functions. It would be
nice to have them. I've got at least one application for it.
Andrew Martin
ICQ: 26227169 http://valley.150m.com/