HP BASIC for OpenVMS Version 1.6
HP BASIC for OpenVMS
• Modern programming language features
— Uses the full printable ASCII character set and 8-
bit character codes within constants and I/O op-
erations.
— 31 character alphanumeric statement labels.
— 31 character variable names, allowing ($), (_) and
(.).
— RECORD structure for user-defined data types
(similar to PASCAL record types), including
RECORD structure retrieval from the Common
Data Dictionary.
— OPTION statement specifing compiler defaults
within source modules.
• Program segmentation
— SUB and FUNCTION subprograms as individually
compiled modules.
— Ability to pass parameters by value, reference, or
descriptor.
— Up to 254 actual arguments per call on external
modules.
— Ability to invoke EXTERNAL function procedures
from HP BASIC.
— Recursive CALL/function invocation.
— Ability to invoke OpenVMS System Service and
Run-Time Library routines.
— Ability to invoke subprograms and function pro-
grams written in other OpenVMS native mode lan-
guages.
— HP BASIC program modules invoked by other
OpenVMS languages.
— Ability to pass optional arguments to non-BASIC
procedures.
— Single and multiple line user-defined functions us-
ing DEF.
— COMMON and MAP statements for creating static
storage areas for communication between pro-
gram modules.
• Graphics - VAX BASIC only
— Statements modeled after ANSI BASIC Graphics.
— Implemented using GKS for OpenVMS to provide
device independence.
— Graphic output primitives including points, lines,
areas, and text.
— Graphic input types including points, menu choice,
value selection, and text.
— Ability to adjust the range of coordinate values to
suit the application.
— SET and ASK statements to specify and retrieve
graphic attribute values.
— Graphic procedures (PICTURE subprograms) for
building complex objects.
— Ability to apply transformations to PICTURE pro-
cedures.
• Full access to OpenVMS Record Management Ser-
vices (RMS)
— Sequential I/O
— Relative I/O
— Multiple key Indexed I/O operations, including
support for integer (word, longword and quad-
word), string, segmented string keys, packed dec-
imal keys, and descending keys
— Random access to sequential fixed files
— Virtual arrays (arrays mapped onto disk struc-
tures)
— Record File Address (RFA) access for direct ac-
cess to records
• Extended report formatting capabilities
— Suppression of zero fields.
— Zero fill, blank fill, or asterisk fill numeric fields.
— Commas in large numeric values.
— CR (credit) or DR (debit) indicators.
— Floating currency symbol for numeric fields.
— Currency and decimal symbols changed for for-
eign usage.
— FORMAT$ function accepting full PRINT USING
editing syntax.
• Implicit or explicit storage declarations
— Specification of data types permitted on COM-
MON, DECLARE, DEF, DIMENSION, EXTER-
NAL, FUNCTION, MAP, RECORD and SUB state-
ments.
— Default data allocation rules specified with DCL
qualifiers, HP BASIC commands, or by the OP-
TION statement in program text.
— By default all declarations implicit, however, the
OPTION TYPE = EXPLICIT can be used to re-
quire explicit declaration of all variables.
— Default constant types specified with the OPTION
CONSTANT TYPE statement.
— INTEGER data type including:
* BYTE (8 bit)
* WORD (16 bit)
* LONG (32 bit)
* QUAD (64 bit)—Alpha and I64 BASIC only
2