Elan, I reported this and its been assigned #1052.  Carl has me convinced
that '- is an alias for 'negate.  It also functions as an in-fix (am I using
the right term?) operator.

>> 5 - 4
== 1
>> 5 ( - 4)
== -4
>> - 5 4
== 4
>>
Personally, I don't think '- should be used as an alias for 'negate, though
of course '- used as a prefix is ok.
Part of the problem is that '- is an allowable character in a word, even for
the first character, so '- is actually a word.  The same can be said for +.

I've given up and retreated to the position that the Dictionary should
describe all this weirdness, rather than showing only the  - followed by two
arguments version - leaving the user to find the true definition by
experimentation!!??


Russell, [EMAIL PROTECTED]
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, October 22, 1999 10:01 AM
Subject: [REBOL] Use of - in prefix notation.


>
> -- Hi folks,
> Has anyone noticed and previously reported the fact the + and - used as
prefix operators
> act asimmetrically? + performs an addition on two arguments, - turns the
first argument
> into a negative value, discards it and returns the second argument:
>
> >> - 3 4
> == 4
>
> Do you find this to be intuitive, reasonable, preferable?
>
> Elan
>
> =========
> This message brought to you courtesy of Bo and Andrew Grossman's
messenger.r script
> using redit.r - the full-screen REBOL editor. Yeah!
>
>
>
>

Reply via email to