ARexx (38/77)

From:Joseph Duchâtelet
Date:16 Apr 2001 at 14:00:11
Subject:Re: Invalid Symbol ?

Hello Andreas

On 16-Apr-01, you wrote:

> Joseph Duchâtelet wrote in a Mail about "[arexx] Re: Invalid Symbol ?":
>
>> My previous reply was based on a script too (where i used the
>> 'litigious'
>> affectation
>>>> msg.34 = 'eGroups-EW/0.82'
>> I used a single pair of quotes with the Value('msg.34') in this case
>> too.
>
>> Conclusion; the quotes are needed, also, in a script but one pair is
>> enough
>
>> 2d Conclusion: we better avoid to use Value() in those trivial cases.
>
> So, how would you do that:
>
> IF msg.34 = "MSG.34" THEN /* if the var is empty */
> DO
> posi = Find(msg.12,"X-Newsreader:")
> IF posi >0 THEN
> PARSE VAR msg.12 . "X-Newsreader:" xreader '0a'× .
> IF posi = 0 THEN Find(msg.12,"X-Mailer:")
> IF posi >0 THEN
> PARSE VAR msg.12 . "X-Mailer:" xreader '0a'× .
> ELSE
> xreader = ""
> END
> ELSE
> xreader = msg.34
>
> msg.34 gets 'filled' by an external library call. Or it does not get
> 'filled', if the field is not defined. Then it stays just empty. No
> problem so far. But the exception happens at the IF msg.34 = "MSG.34"
> line.
>
> This is why I tried to eValue()ate the variable, since I can not do
> IF "msg.34" = "MSG.34" THEN ...
Of course you cannot do this you are comparing 2 different (quoted) strings
and not a compound variable with a string.

But you can do
IF msg.34 = "MSG.34" THEN

this works perfectly here

All the best
Joseph

------------------------ Yahoo! Groups Sponsor ---------------------~-~>
Do you have 128-bit SSL encryption server security?
Get VeriSign's FREE Guide, "Securing Your
Web Site for Business." Get it now!
http://us.click.yahoo.com/EVNB7A/c.WCAA/bT0EAA/stAVlB/TM
---------------------------------------------------------------------_->

ARexx mailing list - No flames, no overquoting, no crossposting.
Unsubscribe: Blank mail to mailto:arexx-unsubscribe@onelist.com

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/