----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 05, 2000 5:05 AM
Subject: [REBOL] Strange error when I send e-mail
>
> Hi!
>
> I have a problem when I want to send an email. I use this code:
>
> prm: to-file load system/script/args
> if exists? prm [
> dat: load prm
> ]
> ...
> subj: pick dat 6 ; the 6 line in the file is: [a 1st message]
> ...
> header: make system/standard/email compose [
> ...
> subject: (reduce [subj])
> ...
> ]
>
>
> It works sometime, except when the subj contain some words, like "1st". I
mean
> if
> subject is [a test] works
> but when is [a 1st test] fail
You have to ensure that it is a string. Which it should be if you have read
it from a text file.
"[a 1st test]" or "a 1st test". If it is not a string and you just set
subject to a block [a 1st test]
it will fail with something like this (because subject is turned into a
string using 'form before sending)
form [a 1st test]
** Syntax Error: Invalid integer -- 1st.
** Where: (line 1) [a 1st test]
You must be doing something to the string that you didn't show in your
example. Also, is there really a need to use reduce?, nothing in your
example indicates you need it there.
I would still like Rebol to be able to handle these, 1st 2nd 3rd 3m etc
(without having to have them as strings, or at least make 'form handle their
conversion)
Cheers,
Allen K