Call

The call command is identical to the load command with one exception: the name of the file being loaded may be followed by up to nine parameters.

    call "inputfile" <param-1> <param-2> <param-3> ... <param-9>

Previous versions of gnuplot performed macro-like substitution of the special tokens $0, $1, ... $9 with the literal contents of these parameters. This mechanism is now deprecated (see call old-style (p. [*])).

Gnuplot now provides a set of string variables ARG0, ARG1, ..., ARG9 and an integer variable ARGC. When a call command is executed ARG0 is set to the name of the input file, ARGC is set to the number of parameters present, and ARG1 to ARG9 are loaded from the parameters that follow it on the command line. Any existing contents of the ARG variables are saved and restored across a call command.

Because the parameters ARG1 ... ARG9 are stored in ordinary string variables they may be dereferenced by macro expansion (analogous to the older deprecated syntax). However in many cases it is more natural to use them as you would any other variable.

In parallel to the string parameters ARG1 ... ARG9, the passed parameters are stored in an array ARGV[9]. See argv (p. [*]).



Subsections