EasyManuals Logo
Home>HP>Software>TACL

HP TACL User Manual

HP TACL
235 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #57 background imageLoading...
Page #57 background image
3 Developing TACL Routines
107365 Tandem Computers Incorporated 3–1
TACL routines provide features that you cannot obtain from any other type of TACL
variable. In a routine, you can:
Use #ARGUMENT to check the syntax and validity of several types of arguments
or to parse data within your program
Use #RESULT to return a specific result (instead of an expansion of text)
Use #ROUTINENAME to obtain the name of the active routine, for issuing
recursive calls
Use #RETURN to exit from any location in the routine
Create an exception handler that processes events or errors
The following subsections describe how to use these features.
Processing Arguments When you invoke a routine, you can include a list of arguments after the routine name.
A routine does not, however, access these arguments in the same manner as macro
arguments (%n%). Instead, in your routine, you specify an #ARGUMENT function
with a list of argument alternatives. The #ARGUMENT function steps through the list
and checks to see if the current argument matches a specified alternative. If the
argument matches, #ARGUMENT returns an index to the alternative and optionally
stores the argument in a variable for use within the routine.
The following statement checks to see if the next argument is a valid subvolume name
(SUBVOL alternative) or system name (SYSTEMNAME alternative):
#SET num [#ARGUMENT /VALUE name/ SUBVOL SYSTEMNAME]
If the argument is a valid subvolume name, #ARGUMENT assigns 1 to num, indicating
that the argument is a subvolume name, and stores the qualified argument in name.
(The VALUE option affects how the #ARGUMENT built-in function stores the
argument. For more information, see the TACL Reference Manual.)
The following examples show differences between argument processing in macros and
routines. The programs support the following syntax:
process_argm
file-name
process_argr
file-name

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the HP TACL and is the answer not in the manual?

HP TACL Specifications

General IconGeneral
BrandHP
ModelTACL
CategorySoftware
LanguageEnglish

Related product manuals