![]() |
![]() HP OpenVMS SystemsBASIC |
![]() |
Compaq BASIC for OpenVMS
|
Contents | Index |
Compaq BASIC for OpenVMS Alpha is the new name for DEC BASIC. Compaq BASIC for OpenVMS VAX is the new name for VAX BASIC. Any references to the former names in product documentation or other components should be construed as references to the Compaq BASIC names. Any references to BASIC or to Compaq BASIC apply to both products unless otherwise specified. References to the shortened names Alpha BASIC and VAX BASIC mean Compaq BASIC for OpenVMS Alpha and Compaq BASIC for OpenVMS VAX, respectively.
This manual describes BASIC language elements and syntax.
This manual is intended for experienced applications programmers who have a fundamental understanding of the BASIC language. Some familiarity with your operating system is also recommended. This is not a tutorial manual.
This manual contains the following chapters and appendixes:
Chapters 2, 3, and 4 provide reference material on each BASIC language element. The language elements are arranged in alphabetical order within these chapters; each language element begins on a separate page. The descriptions include the following sections:
Definition | A description of what the statement or command does. |
Format | The required syntax for the language element. |
Syntax Rules | Any rules governing the use of parameters, separators, or other syntax items, effect of the statement or command on program execution, and any restrictions governing its use. |
Remarks | Further explanations or restrictions about the statement or command. |
Example | One or more examples of the statement in a partial program. Where appropriate, explanatory text and program output are included. |
A platform is a combination of operating system and central processing unit (CPU) that provides a distinct environment in which to use a product (in this case, a language). This manual contains information for the following language platforms:
Information in this manual applies to both supported platforms, unless it is otherwise noted. Platform-specific information is noted in the manual as follows:
For detailed information about developing, compiling, linking, and running BASIC programs, see the Compaq BASIC for OpenVMS Alpha and VAX Systems User Manual.
For additional information about OpenVMS products and services, access the following World Wide Web address:
http://www.compaq.com/ |
Compaq welcomes your comments on this manual. Please send comments to either of the following addresses:
Internet | » Send Feedback |
Compaq Computer Corporation
OSSG Documentation Group, ZKO3-4/U08 110 Spit Brook Rd. Nashua, NH 03062-2698 |
If you have access to the World Wide Web, please visit our website at
http://h71000.www7.hp.com/commercial/basic/basic_index.html |
Click Software Product Description, and read the ordering information. Note the order numbers of the documents you want. For pricing and further information, call 1--800--282-6672.
Use the following World Wide Web address for information about how to order OpenVMS operating system documentation:
http://www.compaq.com/ |
If you need help deciding which documentation best meets your needs, call 1--800--282--6672.
In this manual, every use of the name Compaq BASIC or the name BASIC applies to both Compaq BASIC for OpenVMS Alpha and Compaq BASIC for OpenVMS VAX software.
Table 1 shows the conventions used in this manual.
Convention | Description |
---|---|
$ | A dollar sign ($) represents the OpenVMS DCL system prompt. |
[Return] |
In examples, a key name enclosed in a box indicates that you press that
key on the keyboard. (In text, a key name is not enclosed in a box.)
In the HTML version of this document, this convention appears as brackets, rather than a box. |
Ctrl/ x | The key combination Ctrl/ x indicates that you must hold down the key labeled Ctrl while you press another key, for example Ctrl/Y or Ctrl/Z. |
KP n | The phrase KP n indicates that you must press the key labeled with the number or character n on the numeric keypad, for example, KP3 or KP-. |
PF1 x | A sequence such as PF1 x indicates that you must first press and release the key labeled PF1, then press and release another key. |
n | A lowercase italic n indicates the generic use of a number. |
... |
A horizontal ellipsis in examples indicates one of the following
possibilities:
|
.
. . |
A vertical ellipsis indicates the omission of items from a code example or command format; the items are omitted because they are not important to the topic being discussed. |
() | In format descriptions, parentheses indicate that you must enclose the options in parentheses if you choose more than one. |
[] | In format descriptions, brackets indicate optional elements; you can select none, one, or all of the elements. |
{ } | In format descriptions, braces indicate that one element in a list is required. You must choose one and only one from the list. |
boldface text | Boldface text is used for the introduction of a new term. |
italic text | Italic text represents parameters, arguments, and information that can vary in system messages (for example, Internal error number), as well as book titles and emphasized information. |
UPPERCASE | Uppercase indicates the name of a command, routine, file, or file protection code, or the abbreviation for a system privilege. |
Table 2 defines mnemonics and other terms used in the syntax diagrams.
Term | Meaning |
---|---|
angle | Angle in radians or degrees |
array | Array; syntax rules specify whether the bounds or dimensions can be specified |
chnl | I/O channel associated with a file |
chnl-exp | Numeric expression that specifies a channel number |
com | Specific to a COMMON block |
cond | Conditional expression; indicates that an expression can be either logical or relational |
cond-exp | Conditional expression |
const | Constant value |
data-type | Data type keyword |
decimal-var | Decimal variable |
decl-item | Array, record, or variable |
def | Specific to a DEF function |
delim | Delimiter |
equiv-name | File specification, device, or logical name to be assigned a logical name |
err-num | Run-time error number |
exp | Expression |
ext-routine | External function |
external-param | External parameter |
file-spec | File specification |
func | Specific to a FUNCTION subprogram |
int | Integer value |
int-const | Integer constant |
int-exp | Expression that represents an integer value |
int-var | Variable that contains an integer value |
label | Alphanumeric statement label |
lex | Lexical; used to indicate a component of a compiler directive |
lex-exp | Lexical expression |
lex-var | Lexical variable |
line | Statement line; may or may not be numbered |
line-num | Statement line number |
lit | Literal value, in quotation marks |
log-exp | Logical expression |
log-name | 1- to 63-character logical name to be associated with equiv-name |
macro-id | User identifier following the rules for BASIC identifiers |
map | Specific to a MAP statement |
matrix | Two-dimensional array |
name | Name or identifier; indicates the declaration of a name or the name of a BASIC structure, such as a SUB subprogram |
num | Numeric value |
num-lit | Numeric literal |
param-list | Parameter list, such as for a SUB subprogram |
pass-mech | Valid BASIC passing mechanism |
prog-name | Program name |
real | Floating-point value |
real-exp | Real expression |
real-var | Real variable |
rel-exp | Relational expression |
relationship-type | Oracle CDD/Repository protocol |
replacement-token | Identifier, keyword, compiler directive, literal constant, or operator |
routine | SUB subprogram or other callable procedure |
str | Character string |
str-exp | Expression that represents a character string |
str-lit | String literal |
str-var | Variable that contains a character string |
sub | Specific to a SUB subprogram |
target | Target point of a branch statement; either a line number or a label |
unq-str | Unique string |
unsubs-var | Unsubscripted variable, as opposed to an array element |
var | Variable |
Next | Contents | Index |