[REBOL] Re: uppercase
From: carl:cybercraft at: 28-May-2002 18:36
On 28-May-02, Charles wrote:
> That is rather odd. The function, I do not feel, should actually
> perform an operation on the argument being passed. At least, not in
> general. Same happens with 'lowercase'.
> Well, it answers the question I recall seeing about capitalizing:
>>> uppercase/part x 1
> ;)
It's rather subjective, I think, and perhaps based on us not being
used to "uppercase" as a verb. 'clear, 'replace 'trim and other words
work on the argument, so why not 'uppercase? It's also more useful I
think, as instead of this...
x: uppercase x
we can use...
uppercase x
>> Hi rebols,
>>>> x: "hello"
>> == "hello"
>>>> y: uppercase x
>> == "HELLO"
>>>> x
>> == "HELLO" <====<<<< Why is x now uppercase?
>> This is really unexpected behavior! Is this a bug?
I'm pretty sure it isn't. But to get around your above problem, just
use 'copy. ie...
>> x: "hello"
== "hello"
>> y: uppercase copy x
== "HELLO"
>> x
== "hello"
>> y
== "HELLO"
>> Is it like this in the new version of rebol (I haven't upgraded
>> yet)?
>> Louis
--
Carl Read