When I type in
$ julia myprog.jl foo bar baz
Where in my code can I go to access the strings "foo", "bar", "baz"
?
I'm looking for the Python equivalent of sys.argv
When I type in
$ julia myprog.jl foo bar baz
Where in my code can I go to access the strings "foo", "bar", "baz"
?
I'm looking for the Python equivalent of sys.argv
A simpler example:
Run it as
Note that the array index starts from 1 and NOT 0. Thus ARGS[2] prints b and not c as in case of many other programming languages.
Ah, more web-searching led to the right answer. The keyword
ARGS::Array{ASCIIString}
holds command line argumentsHere is a simple example
Lets test it at the command line: