Eloquence Language Manual

Table of Contents

Legal Notices
Printing History
Table of Contents
1 - Things to Know Before You Start
Inside This Manual
Conventions
Related User Documentation
2 - Starting Eloquence
Eloquence concepts
Starting the Run-Time Environment
3 - Programming with Eloquence
Programming Guidelines
Entering Programs
Entering a Sample Program
Programming Aids
Program Annotations
The Bit Bucket
Creating programlines dynamically
Execution of COMMAND Statements
Space Dependency
The SPACE INDEPENDENT Statement
The SPACE DEPENDENT Statement
Error Messages
Syntax Errors
Run-Time Errors
Internal Errors
The character oriented development environment
Starting the character oriented Development Environment
Input Redirection
Quitting Eloquence
Program Execution and Edit Commands
Parameter Values
The RUN Command
The CONTINUE Command
The AUTO Command
The REN Command
The DEL Command
The FETCH Command
HOP key
LASTLINE
The LIST and list Commands
The [RE-]STORE and store Commands
Directives
Using store with the C preprocessor
Running a Program
Program Termination
Error Messages
Syntax Errors
Run-Time Errors
Internal Errors
Storing a Program
Listing a Program
The INDENT Command
Interrupting a Program
Program debugging
HOP (Debugging Aid)
Tracing Program Operations
Statement Tracing
External Tracing
Program Cross-Referencing
The SCRATCH Statement
Display Function Characters
The Integrated Development Environment (IDE)
Program Development
The Browser
Compiling a program
Storing and loading program files
Debugging
Initiating a debug session
Stepping through a program
Breakpoint
The Output Toolwindow
The Call Stack Toolwindow
The Variables Toolwindow
Debugging a character oriented program
4 - Data Variables and Data handling
Types and Forms of Variables
Variable Names
String Variables
String Arrays
String Array Defaults
String Expressions
Substrings
The NULL String
String Concatenation
Examples of String Use
Numeric Variables
Real Variable Numeric Ranges
Integer Variable Numeric Range
Numeric Precisions
Numeric Display Formats
Standard Format
Fixed Point Format
Floating Point Format
Rounding
Simple Numeric Variables
Types and Values
Numeric Arrays
Subscripts and Array Size
Array Elements
User defined Types
Type definition
Exporting Types
Type scope
Derived Types
Type instantiation
Using member variables
The STRUCT keyword
Runtime type identification
Data base integration
Error Messages
Example program
Declaring and Dimensioning Variables
The OPTION BASE Statement
The DIM Statement
The NEW statement
The INTEGER Statement
The DINTEGER Statement
The SHORT Statement
The REAL Statement
The COM Statement
Other Features of Variable Declarative Statements
Redimensioning an Array
Assigning Values to Variables
The READ and DATA Statements
The DATA Pointer
The RESTORE statement
The INPUT Statement
The LINPUT Statement
The EDIT Statement
The ENTER Statement
The LENTER Statement
The XLENTER Statement
The ACCEPT Statement
KBCODE
Eloquence keyboard handling
Typeahead
TYPEAHEAD CLEAR
XPACK, XUNPACK statements
The XPACK statement
XPACK ... USING
XPACK ... USING REMOTE LISTS
XPACK ... FROM
The XUNPACK statement
XUNPACK Buf$ USING <string expression>
XUNPACK Buf$ FROM Variable [,Variable ...]
XUNPACK Buf$ USING REMOTE LISTS Line_id[,Line_id ...]
XPACK format description
Simple numeric variable
Simple string variable
Array element
Array
Example Eloquence XUNPACK program
Memory Consumption
Control Byte Overhead
5 - Operators and Functions
Operators and Expressions
Arithmetic Operators
Relational Operators
Logical Operators
Binary Operations
Operational Hierarchy
The Default ON/OFF Statements
Built-in Numeric Functions
Trigonometric Statements and Functions
Random Numbers
Built-In String Functions
The SYSID$ Function
Defining a Function
6 - Branching and Subroutines
Unconditional Branching
The GOTO Statement
The ON GOTO Statement
Conditional Branching
The IF THEN Statement
Looping
The FOR and NEXT Statements
Nesting FOR-NEXT Loops
FOR-NEXT Loop Considerations
Subroutines
The GOSUB Statement
The ON GOSUB Statement
Branching Using Softkeys
ON KEY # Statement
The OFF KEY # Statement
The DISABLE Statement
The ENABLE Statement
The CURKEY Function
LASTKEY
SOFTKEY ON/OFF Statement
Error Testing and Recovery
The ON HALT Statement
The KEYBD function
ON KEYBD
OFF KEYBD
Structured Programming
Structured IF THEN ELSE
The WHILE Block
The LOOP Block
The REPEAT Block
The SELECT Block
7 - Subprograms
Parameters
Multiple-Line Function Subprograms
Subroutine Subprograms
Subprogram Considerations
Temporary Default States
Adding and Deleting Subprograms
Using COM Statements
Busy Lines
8 - File Storage
Syntax Terms
File Structure
Files
Records
EOFs and EORs
Data Access Methods
Serial Access
Direct Access
Direct Word Access
Comparing Data Access Methods
The Default Mass Storage Device
Cataloging Files (CAT)
Using message Catalogs
Identifying Volume Labels
Storing and Retrieving Programs
The STORE Statement
The RE-STORE Statement
The LOAD Statement
The LOAD SUB Statement
The SAVE Statement
The GET Statement
The LINK Statement
The RESAVE Statement
The MERGE Statement
Storaging and Retrieving Data
Creating a Data File
Opening a Data File
Data Pointers
Converting a Text File
Options
Example
Serial Access
The Serial PRINT# Statement
The Serial READ# Statement
Positioning the Record Pointer
Direct Access
The Direct PRINT# Statement
The Direct READ# Statement
Repositioning the Record Pointer
Direct Word Access
The Direct-Word PRINT# Statement
The Direct-Word READ# Statement
Storing and Retrieving Arrays
Closing a File
Purging a File
File Storage Functions
The TYP Function
The SIZE Function
The REC Function
The WRD Function
The FNAME$ Function
Trapping EOR and EOF Conditions
Data Storage Requirements
Multi-User File Protection
Copying a File
Renaming a File
9 - Output Operations
Restrictions on the Use of ASCII Control Characters
Selecting Output Devices
Printer and Port Numbers Vs. Device Addresses
Printers
System Printer
Local Printer
The PRINTER IS Statement
The SYSTEM PRINTER IS Statement
The PRINT ALL IS Statement
The REQUEST Statement
The RELEASE Statement
Audible Output (BEEP)
Displayed Output (DISP)
The LDISP Statement
POPUP BOX
The REFRESH Statement
Output Functions
The TAB Function
The SPA Function
The LIN Function
The PAGE Function
Display Enhancements
The CURSOR Statement
Set Cursor Position
The XPOS and YPOS Functions
Field Enhancements
Protect and Unprotect Lines
Input and Output Fields
The PRINT Statement
Formatted Output
Delimiters
Blank Spaces
String Specifications
Display Enhancements and Alternate Character Sets
Numeric Specifications
Digit Symbols
Radix Symbols
Sign Symbols
Digit Separator Symbols
Floating Specifiers
Symbol Replication
Compacted Specifier
Carriage Control
Reusing the Image String
Field Overflow
Spool Files
Creating Spool Files
Recording into Spool Files
Dumping Spool Files
Appending to Spool Files
Spool File Errors
Printer Control Functions
10 - Matrix Operations
Redimensioning Arrays
Reading and Printing Arrays
MAT READ
MAT PRINT
File Input/Output
Assigning Values to Arrays
MAT INPUT
MAT . . . CON
MATZER
MAT-initialize
Arithmetic Operations
Copying an Array
Scalar Operations
Matrix Arithmetic Operations
Array Functions
System Functions
The SUM Function
The ROW Function
The COL Function
Matrix Operations
MAT . . . CSUM
MATRSUM
11 - System Clock
Returning the Current System Time and Date
The TIME$ Function
The DATE$ Function
Measuring Elapsed Time
The CLOCK Function
Programmed Delays
The WAIT Statement
The SLEEP Statement
Event Scheduling
The ON DELAY Statement
The OFF DELAY Statement
12 - Multiple Task Programming
Primary and Secondary Tasks
Configuration Requirements
Multi-Tasking Statements
The REQUEST # Statement
The ATTACH # Statement
The ATTACH Statement
The DETACH Statement
The RELEASE # Statement
Example Program Using TASK
Error Codes
HP-UX Background Processing
Option One
Option Two
Starting Eloquence from an Eloquence program.
Programming Considerations
Resource Management
Output Device Control
File Access
Database Locking
DBOPEN
LOCKING
Performance Considerations
Database Performance
Output Performance
Functions for Task Control
The TSTAT Function
The OWNID Function
The XOWNID Function
The SHOWTASK Function
The SIGNAL statements
13 - Asynchronous Devices
TIO Statements
The ON INPUT # Statement
The AREAD$ Function
The OFF INPUT # Statement
The AOVFL function
Eloquence Statements Used With TIO
The REQUEST and RELEASE Statements
The DISABLE and ENABLE Statements
The CURKEY Function
Programming with TIO
Programming Overview
Programming Tips
CALL
No Branching Statement
Programming Approaches
Straight Line Approach
Modular Approach
Array Addressing Mode
Executive Mode
Structured Programming
Basic Structural Flow
Example Program
Transaction Driven Applications
State Machine Model
Controlling Your Application
14 - Integrating C Functions (DLL)
Using DLL in Eloquence
The LOAD DLL Statement
The DEL DLL Statement
The CALL DLL Statement
Shared Memory
Generating a DLL
DLLCC
Example
Programming Guidelines
DLL interface level
DLL interface level functions
Setup/cleanup hooks
Signals
Environment
Debugging
xdb
DLL communication level
DLL communication level utilities
Error Messages
15 - Statement Flow Analyser
sfagen
Syntax
Example
sfarpt
Syntax
Options
A - Reference Tables
System Reset Conditions
TYP Function Return Values
ASSIGN Statement Return Variable
File Types
IMAGE Formatting Symbols
Storage Requirements
Display Enhancement Codes/Character Set Switching Codes
ASCII Character Codes
B - Eloquence Syntax
Introduction
Syntax List
A
B
C
D
E
F
G
H
I
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
C - Error Messages
Pack Errors
IMAGE Errors
PREDICATE Errors
SORT Errors
Report Writer Errors
FORMS Errors
TIMER Errors
TIO Errors
TASK Errors
User Defined Types Errors
HP-UX Errors
Glossary
Index

Eloquence Language Manual - 19 DEC 2002