[REBOL] Re: Append lit-path
From: ingo::2b1::de at: 21-May-2002 9:00
Hi Ammon, Anton,
Ammon Johnson wrote:
<..>
> I have run into this problem sometimes and it has to do with the conversion
> of a lit-path to other data-types. Try this at the console;
>
>>>to string! 'some/path/value
>>
> == "somepathvalue"
>
> To me that is *very* anoying! I personally think that it aught to leave the
> slashes in there when converting to string, but that is just me. Anyone else?
Well, string conversion of paths is consistent with blocks:
>> to-string 'a/b/c
== "abc"
>> to-string [ a b c ]
== "abc"
>> any-block? 'a/b/c
== true
To preserve slashes, use form:
>> form 'a/b/c
== "a/b/c"
>> append %a/ form 'b/c
== %a/b/c
Kind regards,
Ingo