Credits Overview Plotting Styles Commands Terminals

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>

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. However in many cases it is more natural to use them as you would any other variable.

In parallel with the string representation of parameters ARG1 ... ARG9, the parameters themselves are stored in an array ARGV[9]. See ARGV.

DEPRECATED: Versions prior to 5.0 performed macro-like substitution of the special tokens $0, $1, ... $9 with the literal contents of <param-1> ... That older mechanism is no longer supported.

EXPERIMENTAL: Function blocks (new in this version) provide a more flexible alternative to call. See function blocks.

Subtopics