pTAL Guidelines for TAL Programmers
Contents
pTAL Guidelines for TAL Programmers—527256-002
iv
3. Differences Between TAL and pTAL (continued)
3. Differences Between TAL and pTAL (continued)
Overflow Traps 3-20
Overflow Trapping Considerations for TAL and pTAL 3-21
OVERFLOW_TRAPS Directive 3-21
OVERFLOW_TRAPS Procedure Attribute 3-23
ENABLE_OVERFLOW_TRAPS Block Attribute 3-24
Returning From Function Procedures 3-27
Glossary
Index
Examples
Example 2-1. PTAL Conditional Compilation Toggle 2-6
Example 2-2. Setting Variables and Parameters to Zero (TAL Only) 2-6
Example 2-3. Zero in Variable After Buffer Ensures That Scan Stops
(TAL Only) 2-7
Example 2-4. Zero in Last Element of Buffer Ensures That Scan Stops 2-7
Example 2-5. Zero in Next Field of Structure Ensures That Scan Stops 2-8
Example 2-6. Overflow Trap 2-10
Example 2-7. Exchanging Contents of STRING Pointers 2-12
Example 2-8. Storing Variable Address in Pointer 2-13
Example 2-9. Variable Can Store Integer or Address (TAL Only) 2-14
Example 2-10. Valid Assignments 2-15
Example 2-11. Subtracting Two Addresses 2-16
Example 2-12. Incrementing a Pointer 2-18
Example 2-13. Incrementing a Pointer by Indexing 2-18
Example 2-14.
Comparing Addresses to Addresses 2-19
Example 2-15.
Comparing Addresses to Constants 2-20
Example 2-16. Using Addresses to Find String Length 2-20
Example 2-17. Comparing Two Addresses 2-21
Example 2-18. Determining Location of Data Before Scanning (TAL Only) 2-21
Example 2-19. Ensuring Location of Data Before Scanning 2-22
Example 2-20. Scanning Algorithm 2-23
Example 2-21. Equivalencing a Variable to an Indirect Pointer (TAL Only) 2-23
Example 2-22. Equivalencing a Pointer to an Indirect Pointer 2-24
Example 2-23. Using a Pointer to Read the Address of an Indirect Item 2-24
Example 2-24. Using Base-Address Equivalenced Declarations to Access Stack
Marker (TAL Only) 2-26