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 #66 background imageLoading...
Page #66 background image
Processing Arguments
Developing TACL Routines
3–10 107365 Tandem Computers Incorporated
Figure 3-3. Returning a Set of Characters From a Variable
?SECTION substring ROUTINE
#FRAME
#PUSH bgn end var
#IF [#ARGUMENT/VALUE var/VARIABLE]
#IF [#ARGUMENT/VALUE bgn/NUMBER]
#IF [#ARGUMENT/VALUE end/NUMBER]
#IF [#ARGUMENT END]
[#RESULT [#CHARGET [var] [bgn] TO [end]]]
#UNFRAME
Note This routine does not check to make sure that
number2
is a greater number than
number1
. For
more thorough argument validation, include that check.
Use the routine in Figure 3-4, scan, to scan for text and retrieve the first position,
starting at a specified position, where the text occurs in the variable. The syntax is:
scan
variable number text
Do not enclose
text
in double quotes unless the quotes are part of the text.
Figure 3-4. Searching for Text
?SECTION scan ROUTINE
#FRAME
#PUSH var num txt
#IF [#ARGUMENT/VALUE var/VARIABLE]
#IF [#ARGUMENT/VALUE num/NUMBER]
#IF [#ARGUMENT/VALUE txt/TEXT]
#IF [#ARGUMENT END]
[#RESULT [#CHARFINDV [var] [num] txt]]
#UNFRAME
Note If you do not include square brackets around the variable names in the #CHARxxx calls, TACL uses the
declared variables (var and num) instead of the variables passed to the routine and referenced by var
and num.
Use the routine in Figure 3-5, length, to retrieve the number of characters in a
variable (including end-of-line characters). The syntax is:
length
variable

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