[Swift-devel] arguments to swift
Veronika V. Nefedova
nefedova at mcs.anl.gov
Tue May 1 14:53:40 CDT 2007
Hi,
I couldn't find info on how to pass the arguments to the swift script. For
example, I need to pass an integer, say NUM=5 on the command line when I am
invoking swift. And inside swift script I'd like to address that variable
(is it @arg(NUM) ?)... I tried several variations but none seems to work.
Could somebody please point me to the documentation or give me an example
on how to do that?
This is one of the few syntax that I tried (and it didn't work):
inside swift script (how to address it):
type file{}
int N = @arg(NUM);
int range[] = [1:N];
foreach i in range {
BLA
}
and on the command line - how to specify an argument:
swift bla.swift NUM=2
Thanks!
Nika
More information about the Swift-devel
mailing list