Document revision date: 19 July 1999
[Compaq] [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]
[OpenVMS documentation]

OpenVMS Debugger Manual


Previous Contents Index

C.13 Pascal

The following subtopics describe debugger support for Pascal.

C.13.1 Operators in Language Expressions

Supported Pascal operators in language expressions include:
Kind Symbol Function
Prefix + Unary plus
Prefix - Unary minus (negation)
Infix + Addition, concatenation
Infix - Subtraction
Infix * Multiplication
Infix / Real division
Infix DIV Integer division
Infix MOD Modulus
Infix REM Remainder
Infix ** Exponentiation (VAX specific)
Infix IN Set membership
Infix = Equal to
Infix <> Not equal to
Infix > Greater than
Infix >= Greater than or equal to
Infix < Less than
Infix <= Less than or equal to
Prefix NOT Logical NOT
Infix AND Logical AND
Infix OR Logical OR

The typecast operator (::) is not supported in language expressions.

C.13.2 Constructs in Language and Address Expressions

Supported constructs in language and address expressions for Pascal follow:
Symbol Construct
[ ] Subscripting
. (period) Record component selection
^ (circumflex) Pointer dereferencing

C.13.3 Predefined Symbols

Supported Pascal predefined symbols follow:
Symbol Meaning
TRUE Boolean True
FALSE Boolean False
NIL Nil pointer

C.13.4 Built-In Functions

Supported Pascal built-in functions follow:
Symbol Meaning
SUCC Logical successor
PRED Logical predecessor

C.13.5 Data Types

Supported Pascal data types follow:
Pascal Data Type Operating System Data Type Name
INTEGER Longword Integer (L)
INTEGER Word Integer (W,WU)
INTEGER Byte Integer (B,BU)
UNSIGNED Longword Unsigned (LU)
UNSIGNED Word Unsigned (WU)
UNSIGNED Byte Unsigned (BU)
SINGLE, REAL F_Floating (F)
REAL (Alpha specific) IEEE S_Floating (FS)
DOUBLE D_Floating (D)
DOUBLE G_Floating (G)
DOUBLE (Alpha specific) IEEE T_Floating (FT)
QUADRUPLE (VAX specific) H_Floating (H)
BOOLEAN (None)
CHAR ASCII Text (T)
VARYING OF CHAR Varying Text (VT)
SET (None)
FILE (None)
Enumerations (None)
Subranges (None)
Typed Pointers (None)
Arrays (None)
Records (None)
Variant records (None)

The debugger accepts Pascal set constants such as [1,2,5,8..10] or [RED, BLUE] in Pascal language expressions.

Floating-point numbers of type REAL may be represented by F_Floating or IEEE S_Floating, depending on compiler switches or source code attributes.

Floating-point numbers of type DOUBLE may be represented by D_Floating, G_Floating, or IEEE T_Floating, depending on compiler switches or source code attributes.

C.13.6 Additional Information

In general, you can examine, evaluate, and deposit into variables, record fields, and array components. An exception to this occurs under the following circumstances: if a variable is not referenced in a program, the Pascal compiler might not allocate the variable. If the variable is not allocated and you try to examine it or deposit into it, you will receive an error message.

When you deposit data into a variable, the debugger truncates the high-order bits if the value being deposited is larger than the variable; the debugger fills the high-order bits with zeros if the value being deposited is smaller than the variable. If the deposit violates the rules of assignment compatibility, the debugger displays an informational message.

You can examine and deposit into automatic variables (within any active block); however, because automatic variables are allocated in stack storage and are contained in registers, their values are considered undefined until the variables are initialized or assigned a value.

C.13.7 Restrictions

Restrictions in debugger support for Pascal are as follows.

You can examine a VARYING OF CHAR string, but you cannot examine the .LENGTH or .BODY fields using the normal language syntax. For example, if VARS is the name of a string variable, the following commands are not supported:


DBG> EXAMINE VARS.LENGTH
DBG> EXAMINE VARS.BODY

To examine these fields, use the techniques illustrated in the following examples.
Use Instead of
EXAMINE/WORD VARS EXAMINE VARS.LENGTH
EXAMINE/ASCII VARS+2 EXAMINE VARS.BODY

C.14 PL/I

The following subtopics describe debugger support for PL/I.

C.14.1 Operators in Language Expressions

Supported PL/I operators in language expressions include:
Kind Symbol Function
Prefix + Unary plus
Prefix - Unary minus (negation)
Infix + Addition
Infix - Subtraction
Infix * Multiplication
Infix / Division
Infix ** Exponentiation
Infix || Concatenation
Infix = Equal to
Infix ^= Not equal to
Infix > Greater than
Infix >= Greater than or equal to
Infix ^< Greater than or equal to
Infix < Less than
Infix <= Less than or equal to
Infix ^> Less than or equal to
Prefix ^ Bit-wise NOT
Infix & Bit-wise AND
Infix | Bit-wise OR

C.14.2 Constructs in Language and Address Expressions

Supported constructs in language and address expressions for PL/I follow:
Symbol Construct
( ) Subscripting
. (period) Structure component selection
-> Pointer dereferencing

C.14.3 Data Types

Supported PL/I data types follow:
PL/I Data Type Operating System Data Type Name
FIXED BINARY Byte- (B), Word- (W), or Longword- (L) Integer
FIXED DECIMAL Packed Decimal (P)
FLOAT BIN/DEC F_Floating (F)
FLOAT BIN/ DEC D_Floating (D)
FLOAT BIN/DEC G_Floating (G)
FLOAT BIN/DEC (VAX specific) H_Floating (H)
BIT Bit (V)
BIT Bit Unaligned (VU)
CHARACTER ASCII Text (T)
CHARACTER VARYING Varying Text (VT)
FILE (None)
Labels (None)
Pointers (None)
Arrays (None)
Structures (None)

C.14.4 Static and Nonstatic Variables

Variables of the following storage classes are allocated statically:

Variables of the following storage classes are allocated nonstatically (on the stack or in registers):

C.14.5 Examining and Manipulating Data

The following subtopics give examples of the EXAMINE command with PL/I data types. They also highlight aspects of debugger support that are specific to PL/I.

C.14.5.1 EXAMINE Command Examples

The following examples show use of the EXAMINE command with a few selected PL/I data types.

C.14.5.2 Notes on Debugger Support

Note the following points about debugger support for PL/I.

You cannot use the DEPOSIT command with entry or label variables or formats, or with entire arrays or structures. You cannot use the EXAMINE command with entry or label variables or formats; instead, use the EVALUATE/ADDRESS command.

You cannot use the EXAMINE command to determine the values or attributes of global literals (such as GLOBALDEF VALUE literals) because they are static expressions. Instead, use the EVALUATE command.

You cannot use the EXAMINE, EVALUATE, and DEPOSIT commands with compile-time variables and procedures. However, you can use EVALUATE and DEPOSIT (but not EXAMINE) with a compile-time constant, as long as the constant is the source and not the destination.

Note that an uninitialized automatic variable does not have valid contents until after a value has been assigned to it. If you examine it before that point, the value displayed is unpredictable.

You can deposit a value into a pointer variable either by depositing another pointer's value into it, thus making symbolic reference to both pointers, or by depositing a virtual address into it. (You can find out the virtual address of a variable by using the EVALUATE/ADDRESS command, and then deposit that address into the pointer.) When you examine a pointer, the debugger displays its value in the form of the virtual address of the variable that the pointer points to.

The debugger treats all numeric constants of the form n or n.n in PL/I language expressions as packed decimal constants, not integer or floating-point constants, in order to conform to PL/I language rules. The internal representation of 10 is therefore 0C01 hexadecimal, not 0A hexadecimal.

You can enter floating-point constants using the syntax nEn or n.nEn.

There is no PL/I syntax for entering constants whose internal representation is Longword Integer. This limitation is not normally significant when debugging, since the debugger supports the PL/I type conversion rules. However, it is possible to enter integer constants by using the debugger's %HEX, %OCT, and %BIN operators, because nondecimal radix constants are assumed to be FIXED BINARY. For example, the EVALUATE/HEXADECIMAL 53 + %HEX 0 command displays 00000035.

C.15 RPG II (VAX Only)

The follow subtopics describe debugger support for RPG II.

C.15.1 Operators in Language Expressions

The following operators are supported in language expressions when the language is set to RPG II:
Kind Symbol Function
Prefix + Unary plus
Prefix - Unary minus (negation)
Infix + Addition
Infix - Subtraction
Infix * Multiplication
Infix / Division
Infix = Equal to
Infix NOT = Not equal to
Infix > Greater than
Infix NOT < Greater than or equal to
Infix < Less than
Infix NOT > Less than or equal to
Prefix NOT Logical NOT
Infix AND Logical AND
Infix OR Logical OR

C.15.2 Constructs in Language and Address Expressions

Supported constructs in language and address expressions for RPG II follow:
Symbol Construct
( ) Subscripting

C.15.3 Data Types

Supported RPG II data types follow:
RPG II Data Type Operating System Data Type Name
Longword binary numeric Longword Integer (L)
Word binary numeric Word Integer (W)
Packed decimal Packed Decimal (P)
Character ASCII Text (T)
Overpunched decimal Right Overpunched Sign (NRO)
Arrays (None)
Tables (None)

C.15.4 Setting Breakpoints or Tracepoints

With RPG II programs, you can set breakpoints using source line numbers, logic cycle labels, user-defined tag names, and subroutine labels. Debugging RPG II programs is somewhat different from debugging programs in other languages, and the additional topics explain where and how you can set breakpoints or tracepoints.


Previous Next Contents Index

  [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]  
  privacy and legal statement  
4538PRO_073.HTML