Make URL
[1/3] from: John:Harbaugh:capmetro at: 30-Oct-2003 12:10
Guys:
When I use this code, everything works:
data: read/lines %//_2003_08/002s1d0.txt
But, when I try to pass a variable to that line, while it returns the
correct URL -the code fails and reports that it was expecting the
correct type URL block:
data: read/lines rejoin [ %///_2003_08/ f1 "s1d0.txt" ]
It there a trick to making the variable URL, or compatible with a URL
block?
I tried
f1: make string! cgi/f1
f1: make none! cgi/f1
f1: make number! cgi/f1
John Harbaugh, Webmaster
512-369-6018
[2/3] from: Steven:White:ci:bloomington:mn:us at: 30-Oct-2003 12:24
You might have to do something to make sure the file name is known to
the REBOL interpreter as a file name, after the rejoining operation. I
believe this is the to-file function, as follows:
data: read/lines to-file rejoin [ %///_2003_08/ f1 "s1d0.txt" ]
Steven White
City of Bloomington
1800 W Old Shakopee Rd
Bloomington MN 55431-3096
USA
952-563-4882 (voice)
952-563-4672 (fax)
[steven--white--ci--bloomington--mn--us]
>>> [John--Harbaugh--capmetro--org] 10/30/03 12:10PM >>>
Guys:
When I use this code, everything works:
data: read/lines %//_2003_08/002s1d0.txt
But, when I try to pass a variable to that line, while it returns the
correct URL -the code fails and reports that it was expecting the
correct type URL block:
data: read/lines rejoin [ %///_2003_08/ f1 "s1d0.txt" ]
It there a trick to making the variable URL, or compatible with a URL
block?
I tried
f1: make string! cgi/f1
f1: make none! cgi/f1
f1: make number! cgi/f1
John Harbaugh, Webmaster
512-369-6018
[3/3] from: andrew::martin::colenso::school::nz at: 24-Dec-2003 22:43
John wrote:
> When I use this code, everything works:
>
> data: read/lines %//_2003_08/002s1d0.txt
>
> But, when I try to pass a variable to that line, while it returns the
correct URL -the code fails and reports that it was expecting the
correct type URL block:
> data: read/lines rejoin [ %///_2003_08/ f1 "s1d0.txt" ]
Hmmmm, perhaps you really meant to write something like this:
>> f1: "002"
== "002"
>> rejoin [ %//_2003_08/ f1 "s1d0.txt" ]
== %//_2003_08/002s1d0.txt
Note the number of "/" characters...
Andrew J Martin
Attendance Officer
Speaking in tongues and performing miracles.
Colenso High School
Arnold Street, Napier.
Tel: 64-6-8310180 ext 826
Fax: 64-6-8336759
http://colenso.net/scripts/Wiki.r?AJM
http://www.colenso.school.nz/
DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally
liable) for materials distributed to or acquired from user e-mail accounts. You can report
any
misuse of an e-mail account to our ICT Manager and the complaint will be investigated.
(Misuse can come in many forms, but can be viewed as any material sent/received that
indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate
language and/or other issues described in our Acceptable Use Policy.)
All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0
Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [postmaster--colenso--school--nz]