ARexx (20/41)

From:Rolf Max Rotvel
Date:22 Aug 2000 at 11:57:35
Subject:Re: Unbalanced parentheses (not!)

Hi Andreas Mixich. You wrote:

> RR> My suggestion is skipping the braces:
> RR>
> RR> decoder = 'call "rexx:Converter/'intype'.decode" "'infile'" "'tmpdir'"'
> RR>
> RR> and use something like
> RR>
> RR> parse value arg(1) with '"'infile'"' '"'tmpdir'"'
> RR>
> RR> in your .decode scripts.
>
> The problem is, that the function, which gets called is an external script.
> But I have to pass arguments to it. Hmmm.....you mean I should leave the
> braces out ? Will this work ? I have to test. Thanks.

Yes it will work. You only need the braces if you want a return
value from the external script.

But actually you need some other way of separating your arguments.
In the example above the quotes around infile and tmpdir will be
stripped when they reach lha.decode. So you can't parse like this:
parse arg '"'in'"' '"'tmp'"'.
What I suggest is using a string separator like ' : ' and then
parse arg in' : 'tmp.

Okay, then decoder =

'call "rexx:Converter/'intype'.decode" "'infile' : 'tmpdir'"'
'address REXX "rexx:Converter/'intype'.decode" "'infile' : 'tmpdir'"'

works the same way. And

'address AREXX "rexx:Converter/'intype'.decode" "'infile' : 'tmpdir'"'

runs the script asynchrously (Like 'run >nil: rexx:script').

if you want to have the external script return something then you
need the braces like this:

'ret = "rexx:Converter/'intype'.decode"("'infile' : 'tmpdir'")'

Regards



Rolf

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