[an error occurred while processing this directive]

HP OpenVMS Systems Documentation

Content starts here

HP Pascal for OpenVMS
User Manual


Previous Contents Index


Appendix B
Entry Points to HP Pascal Utilities

This appendix describes the entry points to utilities in the OpenVMS Run-Time Library that can be called as external routines by an HP Pascal program. These utilities allow you to access HP Pascal extensions that are not directly provided by the language.

B.1 PAS$FAB( f )

The PAS$FAB function returns a pointer to the RMS file access block (FAB) of file f. After this function has been called, the FAB can be used to get information about the file and to access RMS facilities not explicitly available in the HP Pascal language.

The component type of file f can be any type; the file must be open.

PAS$FAB is an external function that must be explicitly declared by a declaration such as the following:


TYPE
   Unsafe_File = [UNSAFE] FILE OF CHAR;
   Ptr_to_FAB  = ^FAB$TYPE;

FUNCTION PAS$FAB
   (VAR F : Unsafe_File) : Ptr_to_FAB;
   EXTERN;

This declaration allows a file of any type to be used as an actual parameter to PAS$FAB. The type FAB$TYPE is defined in the HP Pascal environment file STARLET.PEN, which your program or module can inherit.

You should take care that your use of the RMS FAB does not interfere with the normal operations of the OpenVMS Run-Time Library (RTL). Future changes to the RTL may change the way in which the FAB is used, which may in turn require you to change your program.

For More Information:

  • On the OpenVMS Run-Time Library (HP OpenVMS Programming Concepts Manual)

B.2 PAS$RAB( f )

The PAS$RAB function returns a pointer to the RMS record access block (RAB) of file f. After this function has been called, the RAB can be used to get information about the file and to access RMS facilities not explicitly available in the HP Pascal language.

The component type of file f can be any type; the file must be open.

PAS$RAB is an external function that must be explicitly declared by a declaration such as the following:


TYPE
   Unsafe_File = [UNSAFE] FILE OF CHAR;
   Ptr_to_RAB  = ^RAB$TYPE;

FUNCTION PAS$RAB
   (VAR F : Unsafe_File) : Ptr_to_RAB;
   EXTERN;

This declaration allows a file of any type to be used as an actual parameter to PAS$RAB. The type RAB$TYPE is defined in the HP Pascal environment file STARLET.PEN, which your program or module can inherit.

You should take care that your use of the RMS RAB does not interfere with the normal operations of the OpenVMS Run-Time Library. Future changes to the RTL may change the way in which the RAB is used, which may in turn require you to change your program.

For More Information:

  • On the OpenVMS Run-Time Library (HP OpenVMS Programming Concepts Manual)

B.3 PAS$MARK2( s )

The PAS$MARK2 function returns a pointer to a heap-allocated object of the size specified by s. If this pointer value is then passed to the PAS$RELEASE2 function, all objects allocated with NEW or PAS$MARK2 since the object was allocated are deallocated. PAS$MARK2 and PAS$RELEASE2 are provided only for compatibility with some other implementations of HP Pascal. Their use is not recommended in a modular programming environment. The PAS$MARK2 and PAS$RELEASE2 routines do not work with 64-bit pointers on OpenVMS I64 and OpenVMS Alpha.

While a mark is in effect, any DISPOSE operation will not actually delete the storage, but merely mark the storage for deletion. To free the memory, you must use PAS$RELEASE2.

PAS$MARK2 is an external function that must be explicitly declared. Because the parameter to PAS$MARK2 is the size of the object (unlike the parameter to the predeclared procedure NEW), the best method for using this function is to declare a separate function name for each object you wish to mark. The following example shows how PAS$MARK2 could be declared and used as a function named Mark_Integer to allocate and mark an integer variable:


TYPE
   Ptr_to_Integer = ^Integer;

VAR
   Marked_Integer: Ptr_to_Integer;

[EXTERNAL(PAS$MARK2)] FUNCTION Mark_Integer
   (%IMMED S : Integer := SIZE(Integer))
   : Ptr_to_Integer;
   EXTERN;
   .
   .
   .
Marked_Integer := Mark_Integer;

The parameter to PAS$MARK2 can be 0, in which case the function value is only a pointer to a marker, and cannot be used to store data.

B.4 PAS$RELEASE2( p )

The PAS$RELEASE2 function deallocates all storage allocated by NEW or PAS$MARK2 since the call to PAS$MARK2 allocates the parameter p.

PAS$MARK2 and PAS$RELEASE2 are provided only for compatibility with some other implementations of HP Pascal. Their use is not recommended in a modular programming environment. PAS$RELEASE2 disables AST delivery during its execution, so it should not be used in a real-time environment. The PAS$MARK2 and PAS$RELEASE2 routines do not work with 64-bit pointers on OpenVMS I64 and OpenVMS Alpha.

PAS$RELEASE2 is an external function that must be explicitly declared. An example of its declaration and use is as follows:


TYPE
   Ptr_to_Integer = ^Integer;

VAR
   Marked_Integer : Ptr_to_Integer;

[EXTERNAL(PAS$RELEASE2)] PROCEDURE Release
   (P :[UNSAFE] Ptr_to_Integer);
   EXTERN;
   .
   .
   .
Release (Marked_Integer);

In this example, Marked_Integer is assumed to contain the pointer value returned by a previous call to PAS$MARK2.

For More Information:


Appendix C
Diagnostic Messages

This appendix summarizes the error messages that can be generated by an HP Pascal program at compile time and at run time.

C.1 Compiler Diagnostics

The HP Pascal compiler reports compile-time diagnostics in the source listing (if one is being generated) and summarizes them on the terminal (in interactive mode) or in the batch log file (in batch mode). Compile-time diagnostics are preceded by the following:


           I-
%PASCAL-   W-
           E-
           F-

Table C-1 shows the severity level indicated by each letter.

Table C-1 Compiler Message Warning Levels
Letter Meaning
I An informational message that flags extensions to the Pascal standard, identifies unused or possibly uninitialized variables, or provides additional information about a more severe error.
W A warning that flags an error or construct that may cause unexpected results, but that does not prevent the program from linking and executing.
E An error that prevents generation of machine code; instead, the compiler produces an empty object module indicating that E-level messages were detected in the source program.
F A fatal error.

If the source program contains either E- or F-level messages, the errors must be corrected before the program can be linked and executed.

All diagnostic messages contain a brief explanation of the event that caused the error. This section lists compile-time diagnostic messages in alphabetical order, including their severity codes and explanatory message text. Where the message text is not self-explanatory, additional explanation follows. Portions of the message text enclosed in quotation marks are items that the compiler substitutes with the name of a data object when it generates the message.

64BITBASTYP, 64-bit pointer base types cannot contain file variables
ERROR: File types may not be allocated in 64-bit P2 address space, because their implementation currently assumes 32-bit pointers in internal data structures.

64BITNOTALL, 64-bit pointers are not allowed in this context
ERROR: File types may not be allocated in 64-bit P2 address space, because their implementation currently assumes 32-bit pointers in internal data structures.

ABSALIGNCON, Absolute address / alignment conflict
Error: The address specified by the AT attribute does not have the number of low-order bits implied by the specified alignment attribute.

ACCMETHCON, Specified ACCESS_METHOD conflicts with file's record organization
Warning: You cannot specify ACCESS_METHOD:=DIRECT for a file that has indexed organization or sequential organization and variable-length records. You cannot specify ACCESS_METHOD:=KEYED for a file with sequential or relative organization.

ACTHASNOFRML, Actual parameter has no corresponding formal parameter
Error: The number of actual parameters specified in a routine call exceeds the number of formal parameters in the routine's declaration, and the last formal parameter does not have the LIST attribute.

ACTMULTPL, Actual parameter specified more than once
Error: Each formal parameter (except one with the LIST attribute) can have only one corresponding actual parameter.

ACTPASCNVTMP, Conversion: actual passed is resulting temporary
ACTPASRDTMP, Formal requires read access: actual parameter is resulting temporary
ACTPASSIZTMP, Size mismatch: actual passed is resulting temporary
ACTPASWRTMP, Formal requires write access: actual parameter is resulting temporary
Warning: A temporary variable is created if an actual parameter does not have the size, type, and accessibility properties required by the corresponding foreign formal parameter.

ACTPRMORD, Actual parameter must be ordinal
Error: The actual parameter that specifies the starting index of an array for the PACK or UNPACK procedure must have an ordinal type.

ADDIWRDALIGN, ADD_INTERLOCKED requires variable with at least word alignment
ADDIWRDSIZE, ADD_INTERLOCKED requires 16-bit variable
Error: These restrictions are imposed by the instruction sequence that is used on the target architecture.

ADDRESSVAR, "parameter name" is a VAR parameter, ADDRESS is illegal
Warning: You should not use the ADDRESS function on a nonvolatile variable or component or on a formal VAR parameter.

ADISCABSENT, Formal discriminant "discriminant name" has no corresponding actual discriminant
Error: An actual discriminant must be specified for every formal discriminant in a schema type definition.

ADISCHASNOFRML, Actual discriminant has no corresponding formal discriminant
Error: The number of actual discriminants specified is greater than the number of formal discriminants defined in the schema type definition.

AGGNOTALL, Aggregate variable access of this type not allowed, must be indexed

Error.

ALIATRTYPCON, Alignment attribute / type conflict

ALIGNAUTO, Alignment greater than n conflicts with automatic allocation
Error: The value n has the value 4 on OpenVMS I64; 3 on OpenVMS Alpha, and 2 on OpenVMS VAX. OpenVMS I64 systems align the stack on an octaword boundary. OpenVMS Alpha systems align the stack on a quadword boundary. OpenVMS VAX systems align the stack on a longword boundary. You cannot specify a greater alignment for automatically allocated variables.

ALIDOWN, Alignment down-graded from default of ALIGNED(n)
Info: The value of n is based on the size of the object that is being downgraded.

ALIGNFNCRES, Alignment greater than n not allowed on function result
Error: The value n has the value 4 on OpenVMS I64 systems; 3 on OpenVMS Alpha systems; and 2 on OpenVMS VAX systems. The use of an attribute on a routine conflicts with the requirements of the object's type.

ALIGNINT, ALIGNED expression must be integer value in range 0..n, defaulting to m
Error: The value n has the value of the largest argument to the ALIGNED attribute allowed on the platform.

ALIGNVALPRM, Alignment greater than n not allowed on value parameter
Error: The value n has the value 4 on OpenVMS I64 systems; 3 on OpenVMS Alpha systems; and 2 on OpenVMS VAX systems. The use of an attribute on a parameter conflicts with the requirements of the object's type.

ALLPRMSAM, All parameters to 'MIN' or 'MAX' must have the same type

Error.

APARMACTDEF, Anonymous parameter "parameter number" has neither actual nor default
Error: If the declaration of a routine failed to specify a name for a formal parameter, a call to the routine will result in this error message. The routine declaration will also cause an error to be reported.

ARITHOPNDREQ, Arithmetic operand(s) required

Error.

ARRCNTPCK, Array cannot be PACKED
Error: At least one parameter to the PACK or UNPACK procedure must be unpacked.

ARRHAVSIZ, "routine name" requires that ARRAY component have compile-time known size
Error: You cannot use the PACK and UNPACK procedures to pack or unpack one multidimensional conformant array into another. The component type of the dimension being copied must have a compile-time known size; that is, it must have some type other than a conformant schema.

ARRMSTPCK, Array must be PACKED
Error: At least one parameter to the PACK or UNPACK procedure must be of type PACKED.

ARRNOTSTR, Array type is not a string type
Error: You cannot write a value to a text file (using WRITE or WRITELN) or to a VARYING string (using WRITEV) if there is no textual representation for the type. Similarly, you cannot read a value from a text file (using READ or READLN) or from a VARYING string (using READV) if there is no textual representation for the type. The only legal array, therefore, is PACKED ARRAY [1..n] OF CHAR.

ASYREQASY, ASYNCHRONOUS "calling routine" requires that "called routine" also be ASYNCHRONOUS

Warning.

ASYREQVOL, ASYNCHRONOUS "routine name" requires that "variable name" be VOLATILE
Warning: A variable referred to in a nested asynchronous routine must have the VOLATILE attribute.

ATINTUNS, AT address must be an integer value

Error.

ATREXTERN, "attribute name" attribute allowed only on external routines
Error: The LIST and CLASS_S attributes can be specified only with the declarations of external routines.

ATTRCONCMDLNE, Attribute contradicts command line qualifier
Error: The double-precision attribute specified contradicts the /FLOAT, /G_FLOATING, or /NOG_FLOATING qualifier specified on the compile command line.

ATTRCONFLICT, Attribute conflict: "attribute name"
Information: This message can appear as additional information on other error messages.

ATTRONTYP, Descriptor class attribute not allowed on this type
Error: The use of the descriptor class attribute on the variable, parameter, or routine conflicts with the requirements of the object's type.

AUTOGTRMAXINT, Allocation of "variable name" causes automatic storage to exceed MAXINT bits
Error: The HP Pascal implementation restricts automatic storage to a size of 2,147,483,647 bits.

AUTOMAX, Unable to quadword align automatic variables, using long alignment

Information.

BADANAORG, Analysis data file "file name" is not on a random access device

Fatal.

BADENVORG, Environment file "file name" is not on a random access device

Fatal.

BADSETCMP, < and > not permitted in set comparisons

Error.

BINOCTHEX, Expecting BIN, OCT, or HEX
Error: You must supply BIN, OCT, or HEX as a variable modifier when reading the variable on a nondecimal basis.

BLKNOTFND, "routine" block "routine name" declared FORWARD in "block name" is missing

Error.

BLKTOODEEP, Routine blocks nested too deeply
Error: You cannot nest more than 31 routine blocks.

BNDACTDIFF, Actual's array bounds differ from those of other parameters in same section
Error: All actual parameters passed to a formal parameter section whose type is a conformant schema must have identical bounds and be structurally compatible.

BNDCNFRUN, Bounds of conformant ARRAY "array name" not known until run-time
Error: You cannot use the UPPER and LOWER functions on a dynamic array parameter in a compile-time constant expression.

BNDSUBORD, Bound expressions in a subrange type must be ordinal
Error: The expressions that designate the upper and lower limits of a subrange must be of an ordinal type.

BOOLOPREQ, BOOLEAN operand(s) required
Error: The operation being performed requires operands of type BOOLEAN. Such operations include the AND, OR, and NOT operators and the SET_INTERLOCKED and CLEAR_INTERLOCKED functions.

BOOSETREQ, BOOLEAN or SET operand(s) required

Error.

BYTEALIGN, Type larger than 32 bits can be positioned only on a byte boundary
Error: See the HP Pascal for OpenVMS Language Reference Manual for information on the types that are allocated more than 32 bits.

CALLFUNC, Function "function name" called as procedure, function value discarded

Warning.

CARCONMNGLS, CARRIAGE_CONTROL parameter is meaningless given file's type
Warning: The carriage-control parameter is usually meaningful only for files of type TEXT and VARYING OF CHAR.

CASLABEXPR, Case label and case selector expressions are not compatible
Error: All case labels in a CASE statement must be compatible with the expression specified as the case selector.

CASORDRELPTR, Compile-time cast allowed only between ordinal, real, and pointer types
CASSELORD, Case selector expression must be an ordinal type

Error.

CASSRCSIZ, Source type of a cast must have a size known at compile-time
CASTARSIZ, Target type of a cast must have a size known at compile-time
Error: A variable being cast by the type cast operator cannot be a conformant array or a conformant VARYING parameter. An expression being cast cannot be a conformant array parameter, a conformant VARYING parameter, or a VARYING OF CHAR expression. The target type of the cast cannot be VARYING OF CHAR.

CDDABORT, %DICTIONARY processing of CDD record definition aborted
Error: The HP Pascal compiler is unable to process the CDD record description. See the accompanying CDD messages for more information.

CDDBADDIR, %DICTIONARY directive not allowed in deepest %INCLUDE, ignored
Error: A program cannot use the %DICTIONARY directive in the fifth nested %INCLUDE level. The compiler ignores all %DICTIONARY directives in the fifth nested %INCLUDE level.

CDDBADPTR, invalid pointer was specified in CDD record description
Warning: The CDD pointer data type refers to a CDD path name that cannot be extracted, and is replaced by ^INTEGER.

CDDBIT, Ignoring bit field in CDD record description
Information: The HP Pascal compiler cannot translate a CDD bit data type that is not aligned on a byte boundary and whose size is greater than 32 bits.

CDDBLNKZERO, Ignoring blank when zero attribute specified in CDD record description
Information: The HP Pascal compiler does not support the CDD BLANK WHEN ZERO clause.

CDDCOLMAJOR, CDD description specifies a column-major array
Error: The HP Pascal compiler supports only row-major arrays. Change the CDD description to specify a row-major array.

CDDDEPITEM, Ignoring depends item attribute specified in CDD record description
Information: The HP Pascal compiler does not support the CDD DEPENDING ON ITEM attribute.

CDDDFLOAT, D_floating CDD datatype was specified when compiling with G_FLOATING
Warning: The CDD record description contains a D_floating data type while compiling with G_floating enabled. It is replaced with [BYTE(8)] RECORD END.

CDDFLDVAR, CDD record description contains field(s) after CDD variant clause
Error: The CDD record description contains fields after the CDD variant clause. Because HP Pascal translates a CDD variant clause into a Pascal variant clause, and a Pascal variant clause must be the last field in a record type definition, the fields following the CDD variant clause are illegal.

CDDGFLOAT, G_floating CDD datatype was specified when compiling with NOG_FLOATING
Warning: The CDD record description contains a G_floating data type while compiling with D_floating enabled. It is replaced with [BYTE(8)] RECORD END.

CDDILLARR, Aligned array elements can not be represented, replacing with [BIT(n)] RECORD END
Information: The HP Pascal compiler does not support CDD record descriptions that specify an array whose array elements are aligned on a boundary greater than the size needed to represent the data type. It is replaced with [BIT(n)] RECORD END, where n is the appropriate length in bits.

CDDINITVAL, Ignoring specified initial value specified in CDD record description
Information: The HP Pascal compiler does not support the CDD INITIAL VALUE clause.

CDDMINOCC, Ignoring minimum occurs attribute specified in CDD record description
Information: The HP Pascal compiler does not support the CDD MINIMUM OCCURS attribute.

CDDONLYTYP, %DICTIONARY may only appear in a TYPE definition part
Error: The %DICTIONARY directive is allowed only in the TYPE section of a program.

CDDRGHTJUST, Ignoring right justified attribute specified in CDD record description
Information: The HP Pascal compiler does not support the CDD JUSTIFIED RIGHT clause.

CDDSCALE, Ignoring scaled attribute specified in CDD record description
Information: The HP Pascal compiler does not support the CDD scaled data types.

CDDSRCTYPE, Ignoring source type attribute specified in CDD record description
Information: The HP Pascal compiler does not support the CDD source type attribute.

CDDTAGDEEP, CDD description nested variants too deep
Error: A CDD record description may not include more than 15 levels of CDD variants. The compiler ignores variants beyond the fifteenth level.

CDDTAGVAR, Ignoring tag variable and any tag values specified in CDD record description
Information: The HP Pascal compiler does not fully support the CDD VARIANTS OF field description statement. The specified tag variable and any tag values are ignored.

CDDTOODEEP, CDD description nested too deep
Error: Attributes for the CDD record description exceed the implementation's limit for record complexity. Modify the CDD description to reduce the level of nesting in the record description.

CDDTRUNCREF, Reference string which exceeds 255 characters has been truncated
Information: The HP Pascal compiler does not support reference strings greater than 255 characters.

CDDUNSTYP, Unsupported CDD datatype "standard data type name"
Information: The CDD record description for an item has attempted to use a data type that is not supported by HP Pascal. The HP Pascal compiler makes the data type accessible by declaring it as [BYTE(n)] RECORD END where n is the appropriate length in bytes. Change the data type to one that is supported by HP Pascal or manipulate the contents of the field by passing it to external routines as variables or by using the HP Pascal type casting capabilities to perform an assignment.

CLSCNFVAL, CLASS_S is only valid with conformant strings
Error: When the CLASS_S attribute is used in the declaration of an internal routine, it can be used only on a conformant PACKED ARRAY OF CHAR. The conformant variable must also be passed by value semantics.

CLSNOTALLW, "descriptor class name" not allowed on a parameter of this type
Error: Descriptor class attributes are not allowed on formal parameters defined with either an immediate or a reference passing mechanism.

CMTBEFEOF, Comment not terminated before end of input

Error.

CNFCANTCNF, Component of PACKED conformant parameter cannot be conformant

Error.

CNFREQNCA, Conformants of this parameter type require CLASS_NCA
Error: The conformant parameter cannot be described with the default CLASS_A descriptor. Add the CLASS_NCA attribute to the parameter declaration.

CNSTRNOTALL, Nonstandard constructors are not allowed on nonstatic types
Error: You can write constructors for nonstatic types using the standard style of constructor.

CNSTRONZERO, Record constructors only allow OTHERWISE ZERO

Error.

CNTBEARRCMP, Not allowed on an array component
CNTBEARRIDX, Not allowed on an array index
CNTBECAST, Not allowed on a cast
CNTBECNFCMP, Not allowed on a conformant array component
CNTBECNFIDX, Not allowed on a conformant array index
CNTBECNFVRY, Not allowed on a conformant varying component
CNTBECOMP, Not allowed on a compilation unit
CNTBECONST, Not allowed on a CONST definition part

CNTBEDEFDECL, Not allowed on any definition or declaration part
CNTBEDESPARM, Not allowed on a %DESCR foreign mechanism parameter
CNTBEEXESEC, Not allowed on an executable section
CNTBEFILCMP, Not allowed on a file component
CNTBEFORMAL, Not allowed on a formal discriminant
CNTBEFUNC, Not allowed on a function result
CNTBEIMMPARM, Not allowed on a parameter passed by an immediate passing mechanism
CNTBELABEL, Not allowed on a LABEL declaration part CNTBEPCKCNF, Not allowed on a PACKED conformant array component

CNTBEPTRBAS, Not allowed on a pointer base
CNTBERECFLD, Not allowed on a record field
CNTBEREFPARM, Not allowed on a parameter passed by a reference passing mechanism
CNTBERTNDECL, Not allowed on a routine declaration
CNTBERTNPARM, Not allowed on a routine parameter
CNTBESCHEMA, Not allowed on a nonstatic type
CNTBESETRNG, Not allowed on a set range
CNTBESTDPARM, Not allowed on a %STDESCR foreign mechanism parameter CNTBETAGFLD, Not allowed on a variant tag field

CNTBETAGTYP, Not allowed on a variant tag type
CNTBETO, Not allowed on TO BEGIN/END DO
CNTBETYPDEF, Not allowed on a type definition
CNTBETYPE, Not allowed on a TYPE definition part
CNTBEVALPARM, Not allowed on a value parameter
CNTBEVALUE, Not allowed on a VALUE initialization part
CNTBEVALVAR, Not allowed on a VALUE variable
CNTBEVAR, Not allowed on a VAR declaration part CNTBEVARBLE, Not allowed on a variable

CNTBEVARPARM, Not allowed on a VAR parameter
CNTBEVRYCMP, Not allowed on a varying component
Information: These messages can appear as additional information on other error messages.

COMCONFLICT, COMMON "block name" conflicts with another COMMON or PSECT of same name
Error: You can allocate only one variable in a particular common block, and the name of the common block cannot be the same as the names of other common blocks or program sections used by your program.

COMNOTALN, Component is not optimally aligned
Information: The component indicated is not well aligned and accesses to it will be inefficient.

COMNOTSIZ, Component is not optimally sized
Information: The component indicated is not well sized and accesses to it will be inefficient.

COMNOTALNSIZE, Component is not optimally aligned and sized
Information: The component indicated is not naturally aligned and sized, accesses to it will be inefficient.

COMNOTPOS, Fixed size field positioned after a run-time sized field is not optimal
Information: Much better code can be generated for indicated component if it preceedes all of the run-time sized fields.

CONTXTIGN, Text following constant definition ignored
Warning: When defining constants with the /CONSTANT DCL qualifier, any text appearing after a valid constant definition is ignored.

CPPFILERR, Unable to open included file


Previous Next Contents Index