EasyManua.ls Logo

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 #68 background imageLoading...
Page #68 background image
Processing Arguments
Developing TACL Routines
3–12 107365 Tandem Computers Incorporated
The syntax for getargs is:
getargs
triplet
[
triplet
]...
where
triplet
contains three parts:
{}
REQUIRED
OPTIONAL
type
variable
REQUIRED or OPTIONAL specifies whether the corresponding argument is
required or optional.
Type
is an #ARGUMENT alternative such as FILENAME. The specified type
must not permit spaces. The KEYWORD alternative, for example, cannot be used
because it requires the WORDLIST alternative, which allows spaces in its syntax.
Variable
is a name for the argument. Getargs stores the argument value in a
variable with this name. Getargs pushes
variable
and sets it if a matching
argument is found; otherwise,
variable
is empty.
The following statement asks getargs to search for two arguments—one required
number and one optional text constant:
getargs REQUIRED NUMBER numvar OPTIONAL TEXT datavar
If getargs finds a numeric argument, it pushes num and stores the argument into
num . If getargs finds a text argument, it pushes data and stores the argument in
data .
Figure 3-7. Assigning Values to Arguments (Page 1 of 2)
?SECTION getargs MACRO
== Loop through all triplets
[#IF [#EMPTY %1%] |THEN|
== No more triplets; routine must have no more arguments
SINK [#ARGUMENT END] == Only valid if called by a routine
|ELSE|
#PUSH %3% == Push the variable
== Check first word of triplet for REQUIRED or OPTIONAL
[#CASE %1%
|optional|
[#IF [#EMPTY %4%] |THEN| == Check for more triplets
== No more triplets; argument cannot be followed by
== a comma
[#CASE [#ARGUMENT/TEXT %3%/ %2% END]
|1|
SINK [#ARGUMENT END]
|2|
#SET %3%
|3|
]

Table of Contents

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
NameHP TACL
PurposeTask automation, system management, and application control
CategorySoftware
PlatformHP NonStop
TypeScripting language
DeveloperHewlett-Packard

Summary

Section 1 An Overview of TACL

Running the Examples in This Manual

Instructions for executing manual examples, including setting required variables.

About This Manual

Section 2 Developing TACL Programs

Processing Character Data

Covers tasks like constructing text strings, analyzing output, and manipulating characters.

Debugging TACL Programs

Introduces the TACL debugger for step-by-step execution and variable examination.

Section 3 Developing TACL Routines

Processing Arguments

Details how routines handle arguments using #ARGUMENT, including options and alternatives.

Writing an Exception Handler

Explains handling events like BREAK keys or TACL errors using exception handlers.

4 Accessing Files

#REQUESTER Operation

Describes the #REQUESTER function for opening files and initiating I/O operations.

Requesting Waited Reads

Explains opening files for waited read operations using #REQUESTER.

5 Initiating and Communicating With Processes

Initiating a Process: RUN and #NEWPROCESS

Covers starting processes using RUN and #NEWPROCESS, including startup options.

6 Running TACL as a Server

Running a TACL Process as a Server

Explains making a TACL process a server by establishing its IN file as $RECEIVE.

Running TACL Code as a Server

Details providing TACL code for a TACL-server process using #INPUTV and #REPLYV.

Using TACL as a Pathway Server

Describes creating a Pathway environment with TCP and TACL servers to process requests.

7 Using Programmatic Interfaces

8 Example of a System Management Program

Related product manuals