VAX Pascal Reference Supplement for VMS Systems

*HyperReader

  CONTENTS

  Title Page

  Copyright Page

  Preface

  1      Program Compilation and Execution

  1.1     PASCAL Command
    1.1.1      PASCAL Qualifiers
    1.1.2      Contents of the Compilation Listing File
    1.1.3      Table of Contents
    1.1.4      Source Code
    1.1.5      Cross-Reference Section
    1.1.6      Machine Code Section
    1.1.7      Inline Summary
    1.1.8      Compilation Statistics
    1.1.9      Text Libraries
      1.1.9.1      Using the %INCLUDE Directive for Text Libraries
      1.1.9.2      Specifying Text Libraries on the PASCAL Command Line
      1.1.9.3      Defining Default Libraries

  1.2     LINK Command
    1.2.1      LINK Qualifiers
    1.2.2      Object Module Libraries

  1.3     RUN Command

  1.4     Error Messages

  2      Data Storage and Representation

  2.1     Program Sections
    2.1.1      Establishing Program Sections
    2.1.2      Establishing Program Section Properties

  2.2     Storage Allocation
    2.2.1      Allocation of Variables
    2.2.2      Allocation of Symbolic Constants and Executable Blocks
    2.2.3      Allocation Example

  2.3     Allocation Sizes of Variables
    2.3.1      Allocation Size Examples

  2.4     Alignment Boundaries
    2.4.1      Allignment Boundary Examples

  2.5     Ranges of Integer and Real types

  2.6     Representation of Varying Data

  2.7     Representation of Floating-Point Data
    2.7.1      Single-Precision (SINGLE and REAL Types)
    2.7.2      Double-Precision (DOUBLE Type)
      2.7.2.1      D_Floating-Point
      2.7.2.2      G_Floating-Point
    2.7.3      Quadruple-Precision (QUADRUPLE Type)

  2.8     Representation of Nonstatic Types and Variables
    2.8.1      Representation of Nonstatic Types
    2.8.2      Representation of Variables of Nonstatic Types
      2.8.2.1      Representation Nonstatic Record Fields

  3      Calling Conventions

  3.1     VAX Procedure Calling Standard
    3.1.1      Parameter Lists
    3.1.2      Function Return Values
    3.1.3      Contents of the Call Stack

  3.2     Parameter-Passing Semantics

  3.3     Parameter-Passing Mechanisms
    3.3.1      By Immediate Value Passing Mechanism
    3.3.2      By Reference Passing Mechanism
    3.3.3      By Descriptor Passing Mechanism
      3.3.3.1      CLASS_S Attribute
      3.3.3.2      CLASS_A and CLASS_NCA Attributes
      3.3.3.3      %STDESCR Mechanism Specifier
      3.3.3.4      %DESCR Mechanism Specifier
    3.3.4      Summary of Passing Mechanisms and Passing Semantics

  3.4     Passing Parameters from VAX Pascal Routines to Non-VAX Pascal Routines

  3.5     Passing Parameters from Non-VAX Pascal Routines to VAX Pascal Routines

  4      VMS System Routines

  4.1     System Definitions Files

  4.2     Declaring System Routines
    4.2.1      Methods Used to Obtain VMS Data Types
    4.2.2      Methods Used to Obtain Access Methods
    4.2.3      Methods Used to Obtain Passing Mechanisms
    4.2.4      Data Structure Parameters
    4.2.5      Default Parameters
    4.2.6      Arbitrary Length Parameter Lists

  4.3     Calling System Routines

  5      Input and Output Processing

  5.1     Environment I/O Support
    5.1.1      Indexed Files
    5.1.2      ``Components'' and ``Records''
    5.1.3      Count Fields for Variable-Length Components
    5.1.4      Variable-Length with Fixed-Length Control Field (VFC) Component Format
    5.1.5      Random Access by Record File Address (RFA)
    5.1.6      OPEN Procedure
      5.1.6.1      OPEN Defaults
      5.1.6.2      OPEN and RMS Data Structures
    5.1.7      Default Line Limits

  5.2     User Action Functions

  5.3     File Sharing

  5.4     Record Locking

  6      Implementation Notes: Predeclared Routines and Attributes

  6.1     Environment-Specific Information on Predeclared Routines
    6.1.1      ADD_INTERLOCKED Function
    6.1.2      CLEAR_INTERLOCKED Function
    6.1.3      DATE Function
    6.1.4      GETTIMESTAMP Procedure
    6.1.5      HALT Procedure
    6.1.6      MFPR Function
    6.1.7      MTPR Procedure
    6.1.8      SET_INTERLOCKED Function
    6.1.9      TIME Function

  6.2     Environment-Specific Information on Attributes
    6.2.1      ALIGNED Attribute
    6.2.2      INITIALIZE Attribute
    6.2.3      INHERIT Attribute

  7      Error Processing and Condition Handling

  7.1     Condition Handling Terms

  7.2     Overview of Condition Handling
    7.2.1      Condition Signals
    7.2.2      Handler Responses

  7.3     Writing Condition Handlers
    7.3.1      Establishing and Removing Handlers
    7.3.2      Declaring Parameters for Condition Handlers
    7.3.3      Handler Function Return Values
    7.3.4      Condition Values and Symbols

  7.4     Fault and Trap Handling

  7.5     Examples of Condition Handlers

  8      Programming Tools

  8.1     VMS Debugger
    8.1.1      Compiling and Linking to Prepare for Debugging
    8.1.2      Starting and Terminating a Debugging Session
    8.1.3      Notes on VAX Pascal Support
    8.1.4      Sample Debugging Session

  8.2     VAX Text Processing Utility (TPU)

  8.3     VAX Language-Sensitive Editor (LSE) and the VAX Source Code Analyzer (SCA)
    8.3.1      Preparing an SCA Library
    8.3.2      Starting and Terminating an LSE or an SCA Session
    8.3.3      Compiling from Within LSE
    8.3.4      Notes on VAX Pascal Support
      8.3.4.1      Programming Language Placeholders and Tokens
      8.3.4.2      Placeholder and Design Comment Processing
    8.3.5      LSE and SCA Examples

  8.4     VAX Common Data Dictionary (CDD)
    8.4.1      Accessing the CDD from VAX Pascal Source Programs
    8.4.2      Equivalent VAX Pascal and CDDL Data Types
    8.4.3      CDD Example

  A   Environment-Specific Implementation Features

  A.1     Implementation-Defined Features

  B   Diagnostic Messages

  B.1     Compiler Diagnostics

  B.2     Run-Time Diagnostics

  C   Errors Returned by STATUS and STATUSV Functions

  D   Entry Points to VAX Pascal Utilities

  D.1     PAS$FAB( f )

  D.2     PAS$RAB( f )

  D.3     PAS$MARK2( s )

  D.4     PAS$RELEASE2( p )

  EXAMPLES

  1-1        Machine Code Section of a Compilation Listing

  2-1        Using Program Sections to Allocate Storage

  4-1        Inheriting STARLET.PEN to call SYS$HIBER

  4-2        Using $GETJPIW to Retrieve a Process Name

  5-1        User Action Function

  8-1        Using LSE to Create a FOR Statement

  8-2        Using LSE Comments in Program Design

  8-3        Using %DICTIONARY to Access a CDD Record Definition

  FIGURES

  2-1        Storage of Varying Data

  2-2        Single-Precision Floating-Point Data Representation

  2-3        D_Floating-Point Double-Precision Representation

  2-4        G_Floating-Point Double-Precision Representation

  2-5        Quadruple-Precision Floating-Point Representation

  2-6        Storage of Nonstatic Data Types

  2-7        Storage of Variables of Nonstatic Types

  2-8        Storage of Pointer Variables to Undiscriminated Schema Types

  3-1        Contents of the Run-Time Stack

  TABLES

  1 Conventions Used in This Manual

  1-1        /CHECK Qualifier Options

  1-2        /DEBUG Qualifier Options

  1-3        /DESIGN Qualifier Options

  1-4        /OPTIMIZE Qualifier Options

  1-5        /SHOW Qualifier Options

  1-6        /STANDARD Qualifier Options

  1-7        /TERMINAL Qualifier Options

  1-8        /USAGE Qualifier Options

  1-9        Compilation Listing Contents and Qualifiers

  2-1        Program Section Properties

  2-2        Program Section Data

  2-3        Required Program Section Properties

  2-4        Storage of Types

  2-5        Range of Integer Types

  2-6        Range of Real Types

  3-1        Function Return Methods

  3-2        Parameter-Passing Mechanisms

  3-3        Parameter Descriptors

  3-4        Summary of Passing Mechanisms and Passing Semantics

  3-5        Foreign Mechanism Parameters

  4-1        VAX Pascal Definitions Files

  4-2        Access Type Translations

  4-3        Mechanism Type Translations

  5-1        Default Values for VMS File Specifications

  5-2        Setting of RMS File Access Block Fields by Call to OPEN

  5-3        Setting of RMS Record Access Block Fields by a Call to OPEN

  5-4        Setting of Extended Attribute Block Fields by a Call to OPEN

  5-5        Setting of Name Block Fields by a Call to OPEN

  8-1        Placeholders Within the Declaration Section

  8-2        Placeholders Within the Executable Section

  8-3        Equivalent CDDL and VAX Pascal Data Types

  C-1        STATUS and STATUSV Return Values