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 #64 background imageLoading...
Page #64 background image
Processing Arguments
Developing TACL Routines
3–8 107365 Tandem Computers Incorporated
The following routine expects both a file name and a properly formatted variable
name, but accepts them in either sequence. To run this routine, type the name of the
file that contains this code:
?TACL ROUTINE
#FRAME
#PUSH fname vname
[#CASE [#ARGUMENT /VALUE fname/ FILENAME VARIABLE /SYNTAX/]
|1| #IF [#ARGUMENT /VALUE vname/ VARIABLE /SYNTAX/]
|2| #SETV vname fname == fname contains the variable name;
== move the variable name into vname.
#IF [#ARGUMENT /VALUE fname/ FILENAME]
]
#OUTPUT vname = [vname]
#OUTPUT fname = [fname]
#UNFRAME
Processing Variables as Arguments
The following routine accepts any type of existing variable except a STRUCT or a
STRUCT item:
?TACL ROUTINE
#PUSH vname
#IF [#ARGUMENT /VALUE vname/ VARIABLE /FORBID STRUCT ITEM/]
#OUTPUT [vname]
#POP vname
Processing a Space-Separated List of Words
The following routine accepts a space-separated list of words and returns it as a
comma-separated list.
?SECTION wordlist ROUTINE
#FRAME
#PUSH wurd
[#LOOP |WHILE| [#MORE] |DO|
#IF [#ARGUMENT /VALUE wurd/ WORD /SPACE/]
#RESULT [wurd][#IF [#MORE] |THEN|,]
]
#UNFRAME
If you run wordlist interactively, load the file that defines wordlist and use
#OUTPUT(V) to display the result:
15> #OUTPUT [wordlist a b c]
a, b, c
16>
For information about #RESULT, see “Returning Results,” later in this section.

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