Optional argument in ::method and ::routine - REXX
This is a discussion on Optional argument in ::method and ::routine - REXX ; Hello,
Say I have a routine defined like this
::routine myroutine public
use arg arg1, arg2
return
How can I make 'arg2' optional so that I can call both:
myroutine(1, 2)
myroutine(1)
??
I think what I really need is ...
-
Optional argument in ::method and ::routine
Hello,
Say I have a routine defined like this
::routine myroutine public
use arg arg1, arg2
return
How can I make 'arg2' optional so that I can call both:
myroutine(1, 2)
myroutine(1)
??
I think what I really need is a way to detect within myroutine that arg2 has
not been initialized by the caller.
Thanks in advance and Regards,
SerGioGioGio
-
Re: Optional argument in ::method and ::routine
Use the arg Bif
if arg(2,'e')
then say "arg 2 exists"
else say "arg 2 doesn't exist"
hth
Jon
"SerGioGio" <nospam> wrote in message news:44ddb006@news.starhub.net.sg...
> Hello,
>
> Say I have a routine defined like this
>
> ::routine myroutine public
> use arg arg1, arg2
> return
>
> How can I make 'arg2' optional so that I can call both:
> myroutine(1, 2)
> myroutine(1)
> ??
>
> I think what I really need is a way to detect within myroutine that arg2
has
> not been initialized by the caller.
>
> Thanks in advance and Regards,
>
> SerGioGioGio
>
>
>
Similar Threads
-
By Application Development in forum RUBY
Replies: 8
Last Post: 08-25-2007, 06:34 AM
-
By Application Development in forum Java
Replies: 3
Last Post: 07-14-2007, 09:23 AM
-
By Application Development in forum XML SOAP
Replies: 3
Last Post: 04-30-2007, 04:06 PM
-
By Application Development in forum XML SOAP
Replies: 0
Last Post: 01-13-2006, 03:56 PM
-
By Application Development in forum basic.visual
Replies: 5
Last Post: 12-01-2003, 08:00 PM