[REBOL] Re: to-path newline problem?
From: lmecir:mbox:vol:cz at: 13-Aug-2001 12:13
> What do you people think of
> the difference in the following two?
> (1) Produce a nice path:
> to-path [hello there]
> == hello/there
> (2) Produce a broken path:
> to-path [hello
> == hello/
> Note a newline in the input block
> produces a newline in the output.
> But why is it not the same as the first one?
> A bug?
> Is there any way to quickly remove the newline
> from the block, perhaps, as a workaround?
The newline does no harm IMHO. In fact, the following holds:
block1: [hello there]
path1: to path! block1
path2: to path! block1
path3: to path! block2
equal? :path1 :path2 ; == true
equal? :path1 :path3 ; == true
same? :path1 :path2 ; == false
same? :path1 :path3 ; == false
same? :path3 :path2 ; == false