How #Argument Works; Table 3-1. Functions That Support Arguments - HP TACL Programming Manual

Tandem advanced command language
Table of Contents

Advertisement

How #ARGUMENT Works

Table 3-1 lists the built-in functions that support arguments to routines.

Table 3-1. Functions That Support Arguments

Function
Description
#ARGUMENT
Allows you to define a list of argument types. Compares each argument
against these types. If an argument matches a specified type,
#ARGUMENT returns a number that indicates the position of the argument
type in your list of types. You can optionally specify a variable that will
contain the contents of the argument.
#GETSCAN
Returns the number of characters that #ARGUMENT has processed, not
including the routine name and the first character after the name.
#MORE
Determines whether an entire argument set has been processed.
#RESET
Sets the argument pointer to the beginning of the argument list.
#REST
Returns the number of unprocessed arguments.
#SETSCAN
Specifies the position at which the next #ARGUMENT function will resume
processing arguments.
Use the #ARGUMENT built-in function to specify data types and, in some cases,
entities as arguments. When invoked, #ARGUMENT steps through the list of
supplied arguments.
#ARGUMENT Options
The #ARGUMENT built-in function supports the following options:
PEEK processes an argument but keeps the internal argument pointer at the
current argument.
TEXT specifies a variable to contain an exact copy of the argument.
VALUE specifies a variable to contain the TACL interpretation of the argument
sequence. For example, FILENAME returns a fully-qualified file name, using
defaults if the user did not specify all components of the file name.
You specify options within slashes (/) after #ARGUMENT.
#ARGUMENT Alternatives
Argument types are called alternatives. You specify alternatives after options and
their associated slashes. Alternatives include:
Contiguous characters (CHARACTERS), a string (STRING), or a number
(NUMBER)
Special characters, including "/" (SLASH), "(" (OPENPAREN), ")"
(CLOSEPAREN), and "," (COMMA)
Keywords defined in the routine (KEYWORD), such as TYPE or AGE
107365 Tandem Computers Incorporated
Developing TACL Routines
Processing Arguments
3–3

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents