[REBOL] Re: file bug?
From: hugues:moisy:geosignal at: 9-May-2003 19:13
Hi Romano,
I think i don't understand something with Rebol. Can you explain me, please.
when i do this :
>> load "%s%40a"
== %[s--a]
I get the evaluation of the string, which is converted to a file datatype.
when i do this:
>> load %s%40a
== [l1: 1
l2: 2
l3: 3
l4: 4
l5: 5
]
I get the content of the file.
when i do this
>> load %[s--a]
** Syntax Error: Invalid email -- %[s--a]
** Near: (line 1) load %[s--a]
I get an email address evaluation, when i want a file.
>> load %[s--a--txt]
** Syntax Error: Invalid email -- %[s--a--txt]
** Near: (line 1) load %[s--a--txt]
I get an email address evaluation, when i want a file. the Same problem
>> load %sa.txt
** Access Error: Cannot open /c/rebol/view/sa.txt
** Where: halt-view
** Near: load %sa.txt
I get an error because te file does not exist. So the word %sa.txt as been
evaluated to a file!
So, what i know of rebol is that it evaluates the words. the load command
needs either a file, or a url or a string. And in the rebol documentation
i've read that the files are recognized by a percent just before the path of
the file.
What i don't understand is why the part just after the percent is evaluated
whereas it's just a path in the file syntax.
Another thing :
when i do this :
>> do %sa
** Syntax Error: Script is missing a REBOL header
** Where: halt-view
** Near: do %sa
I get an error because rebol want a script, but the %sa has been evaluated a
a file.
>> do %[s--a]
** Syntax Error: Invalid email -- %[s--a]
** Near: (line 1) do %[s--a]
I get the e-mail error.
So i think it's neither a mold problem, nor a load problem, nor a do
problem. What i don't understand it's why only a part of a word can be
evaluated, before the syntax defining it's datatype.
If you can help me.
Thanks a lot.
Hugues