Compaq BASIC for OpenVMS
Alpha and VAX Systems
User Manual


Previous Contents Index

Chapter 6
6 Simple Input and Output
     6.1     Program Input
         6.1.1         Providing Input Interactively
             6.1.1.1             INPUT Statement
             6.1.1.2             INPUT LINE and LINPUT Statements
             6.1.1.3             Enabling and Disabling the Question Mark Prompt
         6.1.2         Providing Input from the Source Program
             6.1.2.1             READ and DATA Statements
             6.1.2.2             RESTORE Statement
     6.2     Program Output
         6.2.1         Print Zones---The Comma and the Semicolon
         6.2.2         Output Format for Numbers and Strings
     6.3     Terminal-Format Files
         6.3.1         Opening and Closing a Terminal-Format File
         6.3.2         Writing Records to a Terminal-Format File
Chapter 7
7 Arrays
     7.1     Overview of Arrays
     7.2     Creating Arrays Explicitly
         7.2.1         Creating Arrays with the DECLARE Statement
         7.2.2         Creating Arrays with the DIM Statement
             7.2.2.1             Declarative DIM Statements
             7.2.2.2             Executable DIM Statements
         7.2.3         Creating Arrays with the COMMON Statement
         7.2.4         Creating Arrays with the MAP Statement
     7.3     Creating Arrays Implicitly
     7.4     Determining the Bounds of an Array
     7.5     Assigning and Displaying Array Values
         7.5.1         Assigning Values with the LET Statement
         7.5.2         Listing Array Elements with the PRINT Statement
     7.6     Using MAT Statements
         7.6.1         MAT Statement
         7.6.2         MAT READ Statement
         7.6.3         MAT INPUT [#] Statement
         7.6.4         MAT LINPUT [#] Statement
         7.6.5         MAT PRINT [#] Statement
         7.6.6         Matrix I/O Functions (NUM and NUM2)
     7.7     Matrix Operators
         7.7.1         Arithmetic Matrix Operations
             7.7.1.1             Assignment
             7.7.1.2             Addition and Subtraction
             7.7.1.3             Multiplication
         7.7.2         Matrix Functions
             7.7.2.1             TRN Function
             7.7.2.2             INV Function
             7.7.2.3             DET Function
Chapter 8
8 Data Definition
     8.1     Declarative Statements
     8.2     Data Types
     8.3     Setting the Default Data Type and Size
     8.4     Declaring Variables
     8.5     Declaring Named Constants
     8.6     Operations with Multiple Data Types
     8.7     Allocating Dynamic and Static Storage
         8.7.1         COMMON Statement
         8.7.2         MAP Statement
             8.7.2.1             Single Maps
             8.7.2.2             Multiple Maps
         8.7.3         FILL Items
         8.7.4         Using COMMON and MAP Statements in Subprograms
         8.7.5         Dynamic Mapping
Chapter 9
9 Creating and Using Data Structures
     9.1     RECORD Statement
         9.1.1         Grouping RECORD Components
         9.1.2         RECORD Variants
         9.1.3         Accessing RECORD Components
Chapter 10
10 Program Control
     10.1     Statement Modifiers
         10.1.1         IF Modifier
         10.1.2         UNLESS Modifier
         10.1.3         FOR Modifier
         10.1.4         UNTIL Modifier
         10.1.5         WHILE Modifier
         10.1.6         Nesting Modifiers
     10.2     Loops
         10.2.1         FOR...NEXT Loops
         10.2.2         WHILE...NEXT Loops
         10.2.3         UNTIL...NEXT Loops
         10.2.4         Nesting Loops
     10.3     Unconditional Branching (GOTO Statement)
     10.4     Conditional Branching
         10.4.1         ON...GOTO...OTHERWISE Statement
         10.4.2         IF...THEN...ELSE Statement
         10.4.3         SELECT...CASE Statement
     10.5     EXIT and ITERATE Statements
     10.6     Executing Local Subroutines
         10.6.1         GOSUB and RETURN Statements
         10.6.2         ON...GOSUB...OTHERWISE Statement
     10.7     Suspending and Halting Program Execution
         10.7.1         SLEEP Statement
         10.7.2         WAIT Statement
         10.7.3         STOP Statement
         10.7.4         END Statement


Previous Next Contents Index