Problem with load/header and trim/lines
[1/3] from: hallvard::ystad::oops-as::no at: 4-Mar-2004 23:05
Hello list
I'm trying to use load/header for a rebol script to retrieve the header. This works fine:
>> probe first load/header read http://www.oops-as.no/roy/rebol-scripts/url-handler.r
But then trim/lines seems to destroy everything:
>> probe first load/header trim/lines read http://www.oops-as.no/roy/rebol-scripts/url-handler.r
Has anyone seen this before? Does anyone know a workaround?
HY
[2/3] from: antonr:iinet:au at: 5-Mar-2004 17:58
What are you trying to do?
My suggestion: don't use trim/lines (or read for that matter).
The newline between shebang line and the beginning of the rebol
header is removed by trim/lines. I think the rebol header
must begin on a new line.
>> probe load/header {# rebol []}
** Syntax Error: Script is missing a REBOL header
** Near: probe load/header "# rebol []"
>> probe load/header {# ^/rebol []}
make object! [
Title: "Untitled"
Date: none
;...
Type: none
Content: none
]
Anton.
[3/3] from: hallvard:ystad:oops-as:no at: 5-Mar-2004 10:37
Dixit Anton Rolls (07.58 05.03.2004):
>I think the rebol header
>must begin on a new line.
Interesting. I don't recall having seen that in the docs anywhere. OK, the problem seems
to be _found_. I'll find a workaround. Thanks, Anton!
HY