Compaq AA-PWCBD-TE Computer Accessories User Manual


 
4.4 Identifiers . ................................................ 4–5
4.5 Variables . . ................................................ 4–5
4.6 Constants . . ................................................ 4–6
4.7 Operators . . ................................................ 4–7
4.8 Expressions ................................................ 4–8
4.8.1 Arithmetic Expressions .................................... 4–10
4.8.2 Relational Expressions ..................................... 4–10
4.8.3 Pattern Expressions ....................................... 4–11
4.8.4 Boolean Expressions ...................................... 4–11
4.9 Reserved Words ............................................. 4–12
4.9.1 Keywords ............................................... 4–12
4.9.2 Built-In Procedure Names . . ................................ 4–12
4.9.3 Predefined Constants ...................................... 4–12
4.9.4 Declarations and Statements ................................ 4–13
4.9.4.1 Module Declaration .................................... 4–14
4.9.4.2 Procedure Declaration . . ................................ 4–15
4.9.4.3 Procedure Names ...................................... 4–15
4.9.4.4 Procedure Parameters . . ................................ 4–15
4.9.4.5 Procedures That Return a Result . . . ....................... 4–18
4.9.4.6 Recursive Procedures . . . ................................ 4–18
4.9.4.7 Local Variables ........................................ 4–19
4.9.4.8 Constants ............................................ 4–19
4.9.4.9 ON_ERROR Statements ................................ 4–19
4.9.4.10 Assignment Statement . . ................................ 4–20
4.9.4.11 Repetitive Statement . . . ................................ 4–20
4.9.4.12 Conditional Statement . . ................................ 4–20
4.9.4.13 Case Statement ....................................... 4–21
4.9.4.14 Error Handling ....................................... 4–23
4.9.4.15 Procedural Error Handlers ............................... 4–24
4.9.4.16 Case-Style Error Handlers ............................... 4–25
4.9.4.17 Ctrl/C Handling ....................................... 4–28
4.9.4.18 RETURN Statement . . . ................................ 4–28
4.9.4.19 ABORT Statement ..................................... 4–29
4.9.5 Miscellaneous Declarations . ................................ 4–30
4.9.5.1 EQUIVALENCE ....................................... 4–30
4.9.5.2 LOCAL .............................................. 4–30
4.9.5.3 CONSTANT . . ........................................ 4–32
4.9.5.4 VARIABLE . . . ........................................ 4–32
4.10 Lexical Keywords ............................................ 4–32
4.10.1 Conditional Compilation . . . ................................ 4–33
4.10.2 Specifying the Radix of Numeric Constants ..................... 4–34
5 DEC Text Processing Utility Program Development
5.1 Creating DECTPU Programs . . . ................................ 5–1
5.1.1 Simple Programs . ........................................ 5–2
5.1.2 Complex Programs ........................................ 5–2
5.1.3 Program Syntax . . ........................................ 5–3
5.2 Programming in DECwindows DECTPU . . . ....................... 5–4
5.2.1 Widget Support . . ........................................ 5–4
5.2.2 Input Focus Support ...................................... 5–5
v