In your script var_args.jnl:
DEFINE SYMBOL all_args = $*
PPL SET filename $EDIT(all_args, COLLAPSE)
SET MODE META ($filename)plt ! note
no . this will come in with the argument(s)
Then you'd call it with a period included as part of each argument
GO var_args A.
! gives A.plt
GO var_args A. B.
! gives A.B.plt
GO var_args A. B. C ! gives A.B.C.plt
and so forth.
Gary Strand wrote:
(I'm a regular font of questions today.)I want to pass N (N <= 9) arguments to a GO script but I don't want or need
default values for them. For example:Inside var_args:
[I know this doesn't work]
set mode meta $1.$2.$3.$4.plt
And when it's called:
GO var_args A [gives A.plt]
GO var_args A B [gives A.B.plt]
GO var_args A B C [gives A.B.C.plt]
and so on.
Do I need a really big if-else-then block to do this? Thanks.
--
Gary Strand Climate Change Research Section, NCAR (303) 497-1336
strandwg@ucar.edu http://www.cgd.ucar.edu/ccr/strandwg
--
Ansley Manke Pacific Marine Environmental Laboratory Seattle
WA (206)526-6246