Built-in global variables
:stdin
:stdout
:stderr
File objects used for standard input, output and errors:
:stdin
is used for all interactive input (including calls toinput()
);:stdout
is used for the output ofprint()
;- error messages go to
:stderr
.
:argv
The array of command-line arguments.
:argv[0]is the executable name.
It can be accessed only when there is a
:start:marker present in the source code.
(
:start:marker is an analogue of Python's
if __name__ == '__main__'and is used to denote code which shouldn't be executed when this source file is imported from another source file (see this example).)