srfi-193- Command line
This srfi clarifying how the command line arguments can be accessed
command-line, plus a few supporting APIs.
The following procedures are built-in. See Command-line arguments, for the details.
If the first element of
command-line is an empty string,
#f. Otherwise, returns the first element without directory
name and obvious extension (
For example, if you run a Scheme script
as a program, this procedure returns
foo. If you compile
your script to an executable on Windows as the name
/usr/local/bin/foo.exe, this procedure still returns
In general, if you are running a Scheme program as some sort of ’command’,
this procedure returns its name. The exception is when you’re running
a REPL, in which case this procedure returns
This is useful for diagnostic messages, for example.
Returns the cdr of
Returns the directory part of
(script-file), if it has a string path.
It always ends with the directory separator.
#f is returned.
This is useful, for example, to find an auxiliary files relative to the script location.