110x Filetype PDF File size 1.43 MB Source: sector7.com
VSI OpenVMS Pascal for OpenVMS User Manual Publication Date: XXXXXX This manual contains information about selected programming tasks using the VSI Pascal programming language. Operating system and Version: VSI OpenVMS version X.X Software Version: VSI OpenVMS version X.X VMS Software, Inc., (VSI) Bolton, Massachusetts, USA VSI OpenVMS Pascal for OpenVMS User Manual: Copyright © 2018 VMS Software, Inc., (VSI), Bolton Massachusetts, USA Legal Notice Confidential computer software. Valid license from VSI required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license. The information contained herein is subject to change without notice. The only warranties for VSI products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. VSI shall not be liable for technical or editorial errors or omissions contained herein. HPE, HPE Integrity, HPE Alpha, and HPE Proliant are trademarks or registered trademarks of Hewlett Packard Enterprise. Intel, Itanium and IA64 are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. Java, the coffee cup logo, and all Java based marks are trademarks or registered trademarks of Oracle Corporation in the United States or other countries. Kerberos is a trademark of the Massachusetts Institute of Technology. Microsoft, Windows, Windows-NT and Microsoft XP are U.S. registered trademarks of Microsoft Corporation. Microsoft Vista is either a registered trademark or trademark of Microsoft Corporation in the United States and/or other countries. Motif is a registered trademark of The Open Group UNIX is a registered trademark of The Open Group. The VSI OpenVMS documentation set is available on DVD. ii Pascal for OpenVMS User Manual Chapter 1. Compiling VSI Pascal Programs ...................................................................... 1 1.1. PASCAL Command ........................................................................................................ 1 1.1.1. PASCAL Command Examples ................................................................................ 2 1.1.2. PASCAL Qualifiers .............................................................................................. 2 1.1.3. Contents of the Compilation Listing File ................................................................. 18 1.1.4. Text Libraries ..................................................................................................... 20 1.2. LINK Command ........................................................................................................... 22 1.2.1. LINK Command Examples ................................................................................... 22 1.2.2. LINK Qualifiers ................................................................................................. 23 1.2.3. Object Module Libraries ...................................................................................... 23 1.3. RUN Command ............................................................................................................ 24 1.4. Error Messages ............................................................................................................. 24 Chapter 2. Separate Compilation ...................................................................................... 25 2.1. ENVIRONMENT, HIDDEN, and INHERIT Attributes ......................................................... 25 2.2. Interfaces and Implementations ........................................................................................ 29 2.3. Data Models ................................................................................................................. 32 2.4. Separate Compilation Examples ....................................................................................... 35 Chapter 3. Program Correctness, Optimization, and Efficiency .................................... 39 3.1. Compiler Optimizations .................................................................................................. 39 3.1.1. Compile-Time Evaluation of Constants ................................................................... 40 3.1.2. Elimination of Common Subexpressions ................................................................. 41 3.1.3. Elimination of Unreachable Code .......................................................................... 42 3.1.4. Code Hoisting from Structured Statements .............................................................. 42 3.1.5. Inline Code Expansion for Predeclared Functions ..................................................... 42 3.1.6. Inline Code Expansion for User-Declared Routines ................................................... 43 3.1.7. Testing for Inline Expansion on VSI OpenVMS VAX Systems .................................... 43 3.1.8. Operation Rearrangement ..................................................................................... 44 3.1.9. Partial Evaluation of Logical Expressions ................................................................ 44 3.1.10. Value Propagation ............................................................................................. 44 3.1.11. Strength Reduction ( VSI OpenVMS I64 and VSI OpenVMS Alpha systems) ............... 45 3.1.12. Split Lifetime Analysis ( VSI OpenVMS I64 and VSI OpenVMS Alpha systems) .......... 45 3.1.13. Code Scheduling ( VSI OpenVMS I64 and VSI OpenVMS Alpha systems) .................. 45 3.1.14. Loop Unrolling ( VSI OpenVMS I64 and VSI OpenVMS Alpha systems) .................... 46 3.1.15. Alignment of Compiler-Generated Labels .............................................................. 46 3.1.16. Error Reduction Through Optimization ................................................................. 46 3.1.17. Software Pipelining ( VSI OpenVMS I64 and VSI OpenVMS Alpha systems) ............... 47 3.1.18. Processor Selection and Tuning ( VSI OpenVMS Alpha systems) ............................... 47 3.1.19. Compiling for Optimal Performance ..................................................................... 48 3.2. Programming Considerations ........................................................................................... 48 3.3. Implementation-Dependent Behavior ................................................................................ 49 3.3.1. Subexpression Evaluation Order ............................................................................ 49 3.3.2. MAXINT and MAXINT64 Predeclared Constants .................................................... 50 3.3.3. Pointer References .............................................................................................. 50 3.3.4. Variant Records .................................................................................................. 51 3.3.5. Atomicity, Granularity, Volatility, and Write Ordering ................................................ 51 3.3.6. Debugging Considerations .................................................................................... 52 Chapter 4. Programming Tools ......................................................................................... 55 4.1. Debugger Support for VSI Pascal .................................................................................... 55 4.2. Language-Sensitive Editor/Source Code Analyzer Support for VSI Pascal ................................ 56 4.2.1. Programming Language Placeholders and Tokens ..................................................... 56 4.2.2. Placeholder and Design Comment Processing .......................................................... 56 4.2.3. LSE and SCA Examples ...................................................................................... 57 4.3. Accessing CDD/Repository from VSI Pascal ...................................................................... 60 4.3.1. Equivalent VSI Pascal and CDDL Data Types .......................................................... 61 4.3.2. CDD/Repository Example .................................................................................... 62 iii Pascal for OpenVMS User Manual Chapter 5. Calling Conventions ........................................................................................ 65 5.1. VSI OpenVMS Calling Standard ...................................................................................... 65 5.1.1. Parameter Lists .................................................................................................. 65 5.1.2. Function Return Values ........................................................................................ 65 5.1.3. Contents of the Call Stack .................................................................................... 66 5.1.4. Unbound Routines .............................................................................................. 68 5.2. Parameter-Passing Semantics ........................................................................................... 68 5.3. Parameter-Passing Mechanisms ........................................................................................ 68 5.3.1. By Immediate Value ............................................................................................ 69 5.3.2. By Reference ..................................................................................................... 69 5.3.3. By Descriptor .................................................................................................... 70 5.3.4. Summary of Passing Mechanisms and Passing Semantics ........................................... 73 5.4. Passing Parameters between VSI Pascal and Other Languages ............................................... 74 5.4.1. Parameter Mechanisms Versus Parameter Semantics .................................................. 74 5.4.2. Passing Nonroutine Parameters between VSI Pascal and Other Languages ..................... 75 5.4.3. Passing Routine Parameters between VSI Pascal and Other Languages .......................... 76 Chapter 6. Programming on VSI OpenVMS Systems ..................................................... 79 6.1. Using System Definitions Files ........................................................................................ 79 6.2. Declaring System Routines ............................................................................................. 82 6.2.1. Methods Used to Obtain VSI OpenVMS Data Types ................................................. 82 6.2.2. Methods Used to Obtain Access Methods ................................................................ 82 6.2.3. Methods Used to Obtain Passing Mechanisms .......................................................... 83 6.2.4. Data Structure Parameters .................................................................................... 84 6.2.5. Default Parameters .............................................................................................. 85 6.2.6. Arbitrary Length Parameter Lists ........................................................................... 86 6.3. Calling System Routines ................................................................................................ 86 6.4. Using Attributes ............................................................................................................ 87 6.5. Using Item Lists ........................................................................................................... 87 6.6. Using Foreign Mechanism Specifiers on Actual Parameters ................................................... 89 6.7. Using 64-Bit Pointer Types ............................................................................................. 89 6.7.1. Pascal Language Features Not Supported with 64-Bit Pointers ..................................... 90 6.7.2. Using 64-Bit Pointers with System Definition Files ................................................... 91 Chapter 7. Input and Output Processing ......................................................................... 93 7.1. Environment I/O Support ................................................................................................ 93 7.1.1. Indexed Files ..................................................................................................... 93 7.1.2. VSI OpenVMS Components and RMS Records ........................................................ 94 7.1.3. Count Fields for Variable-Length Components ......................................................... 94 7.1.4. Variable-Length with Fixed-Length Control Field (VFC ) Component Format ................. 94 7.1.5. Random Access by Record File Address (RFA ) ....................................................... 94 7.1.6. OPEN Procedure ................................................................................................ 94 7.1.7. Default Line Limits ............................................................................................. 99 7.2. User-Action Functions ................................................................................................... 99 7.3. File Sharing ................................................................................................................ 102 7.4. Record Locking ........................................................................................................... 102 Chapter 8. Error Processing and Condition Handling .................................................. 105 8.1. Condition Handling Terms ............................................................................................ 105 8.2. Overview of Condition Handling .................................................................................... 106 8.2.1. Condition Signals .............................................................................................. 106 8.2.2. Handler Responses ............................................................................................ 106 8.3. Writing Condition Handlers ........................................................................................... 107 8.3.1. Establishing and Removing Handlers .................................................................... 107 8.3.2. Declaring Parameters for Condition Handlers ......................................................... 108 8.3.3. Handler Function Return Values .......................................................................... 109 8.3.4. Condition Values and Symbols ............................................................................ 110 8.3.5. Using Condition Handlers that Return SS$_CONTINUE .......................................... 110 iv
no reviews yet
Please Login to review.