[REBOL] Re: file bug?
From: joel:neely:fedex at: 9-May-2003 14:12
Hi, Hugues,
To us a string that contains special characters as a file name,
enclose the name (after the % type specifier) in quotes.
>> length? %"[s--a]" == 3
>> file? %"[s--a]" == true
>> datatype? %"[s--a]" == false
>> type? %"[s--a]" == file!
-jn-
Hugues Moisy wrote:
> Hi Romano,
>
> To me, the problem is important because whatever i do with %[s--a], i get the
> same error.
>
> Some examples :
>
> >>
> >> length? %sa
> == 2
> >> length? %[s--a]
> ** Syntax Error: Invalid email -- %[s--a]
> ** Near: (line 1) length? %[s--a]
> >>
> >> file? %sa
> == true
> >> file? %[s--a]
> ** Syntax Error: Invalid email -- %[s--a]
> ** Near: (line 1) file? %[s--a]
> >>
> >> datatype? %sa
> == false
> >> datatype? %[s--a]
> ** Syntax Error: Invalid email -- %[s--a]
> ** Near: (line 1) datatype? %[s--a]
> >>
> >> write/append/lines %sa ["toto"]
> >> write/append/lines %[s--a] ["toto"]
> ** Syntax Error: Invalid email -- %[s--a]
> ** Near: (line 1) write/append/lines %[s--a] ["toto"]
> >>
> >>
> >> error? write/append/lines %sa ["toto"]
> == false
> >> error? write/append/lines %[s--a] ["toto"]
> ** Syntax Error: Invalid email -- %[s--a]
> ** Near: (line 1) error? write/append/lines %[s--a] ["toto"]
> >>
>
> Ciao,
>
> Hugues
>
> ----- Original Message -----
> From: "Romano Paolo Tenca" <[rotenca--telvia--it]>
> To: <[rebol-list--rebol--com]>
> Sent: Friday, May 09, 2003 2:35 PM
> Subject: [REBOL] Re: file bug?
>
> > Hi Hugues,
> >
> > > > I think that mold and save should transform:
> > > >
> > > > %[s--a]
> > > >
> > > > in this molded string:
> > > >
> > > > %s%40a
> > > >
> > > > so i think that is a mold bug.
> >
> > > I don't think it's a mold bug because other ways do the same.
> >
> > >> type? probe load "%s%40a"
> > %[s--a]
> > == file!
> >
> > ---
> > Ciao
> > Romano
> >
> > --
> > To unsubscribe from this list, please send an email to
> > [rebol-request--rebol--com] with "unsubscribe" in the
> > subject, without the quotes.
> >
> >
>
> --
> To unsubscribe from this list, please send an email to
> [rebol-request--rebol--com] with "unsubscribe" in the
> subject, without the quotes.
--
----------------------------------------------------------------------
Joel Neely joelDOTneelyATfedexDOTcom 901-263-4446
Counting lines of code is to software development as
counting bricks is to urban development.