Processing Arguments
Developing TACL Routines
3–14
107365 Tandem Computers Incorporated
The following shows a sample invocation of
call_getargs
:
11> call_getargs data1, data2, 4
file1 = data1
file2 = data2
n1 = 4
12>
Figure 3-8. Sending Arguments to a Parsing Program
?SECTION call_getargs ROUTINE
#FRAME
[getargs
REQUIRED filename file1
REQUIRED filename file2
OPTIONAL number n1
OPTIONAL number n2
]
== Display the results
#OUTPUT file1 = [file1]
#OUTPUT file2 = [file2]
[#IF NOT [#EMPTY [n1]] |THEN|
#OUTPUT n1 = [n1]
]
[#IF NOT [#EMPTY [n2]] |THEN|
#OUTPUT n1 = [n2]
]
#UNFRAME