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 #61 background imageLoading...
Page #61 background image
Processing Arguments
Developing TACL Routines
107365 Tandem Computers Incorporated 3–5
To process several types of arguments entered in any order, use a #CASE statement.
Use the routine in Figure 3-1 to process zero or more of the following:
File attribute names (defined in ALL)
Numbers
Figure 3-1. Processing Arguments
?SECTION mult_args ROUTINE
#FRAME
#PUSH stat count end
#SET count 0
#SET end 0
[#DEF attributes TEXT |BODY|
Type Size Age Owner Security
]
#OUTPUT Entered arguments were: [#REST]
[#LOOP |DO|
#SET count [#COMPUTE [count] + 1]
[#CASE [#ARGUMENT/VALUE stat/
KEYWORD/WORDLIST [attributes]/ NUMBER END OTHERWISE]
|1|
#OUTPUT Argument [count] is the keyword [stat].
|2|
#OUTPUT Argument [count] is the number [stat].
|3|
#SET end 1
|4|
#OUTPUT *** Invalid argument ***
#SET end 1
]
|UNTIL| (NOT [#MORE]) OR end
]
#UNFRAME
Using #ARGUMENT for Data Within a Program
TACL itself does not provide data type declarations and functions, but you can write a
function that uses #ARGUMENT to determine the type and return the information.
The following routine returns TRUE (not zero) if you pass it a number; otherwise, it
returns FALSE:
?SECTION anumber ROUTINE
#RESULT [#COMPUTE NOT ([#ARGUMENT NUMBER OTHERWISE] - 1)]
Variations on this routine could return TRUE for text or special characters, a number
that reflects a group of argument types, or an index into the entire set of
#ARGUMENT alternatives.

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