How do I detect what command line arguments where given when a script is run with mred? That is, the equivalent of sys.argv in Python, args[] in Java, etc...
+1
A:
You have these choices (you can look them all up in the docs for more info):
current-command-line-arguments
-- a vector holding the command line argumentsYou can start a script with the
-m
flag, which will require the file and look for a providedmain
function, then apply it on the command-line arguments (as a list of strings)Or you can require the
scheme/cmdline
which provides a macro that can be used to define several flags in a convenient way.
Eli Barzilay
2009-11-11 06:11:41