Syntax errors [ HP Business BASIC/XL Reference Manual ] MPE/iX 5.0 Documentation
HP Business BASIC/XL Reference Manual
Syntax errors
The following error messages are the syntax errors. They are all error
68, although in some cases you will get these messages instead of the
message for error 68 (Syntax error at character N). Those errors are
marked as substitute errors.
-----------------------------------------------------------------------------
MESSAGE One of the clauses is not allowed with this statement.
CAUSE One of the clauses following an HP Business BASIC/XL database
keyword incorrectly occurs following that keyword.
ACTION Check the syntax of the database statement in the Help Catalog
or the HP Business BASIC/XL Reference Manual to be certain that
you are using the correct syntax.
-----------------------------------------------------------------------------
MESSAGE One of the clauses occurred more than once.
CAUSE One of the clauses following an HP Business BASIC/XL database
keyword has been repeated.
ACTION Check the syntax of the database statement in the Help Catalog
or the HP Business BASIC/XL Reference Manual to be certain that
you are using the correct syntax.
-----------------------------------------------------------------------------
MESSAGE The statement is missing one or more clauses.
CAUSE This is a substitute message for error number 68. One or more
of the clauses following an HP Business BASIC/XL database
keyword is missing.
ACTION Check the syntax of the database statement in the Help Catalog
or the HP Business BASIC/XL Reference Manual to be certain that
you are using the correct syntax.
-----------------------------------------------------------------------------
MESSAGE The line number is not between 1 and 999999.
CAUSE This is a substitute message for error number 68. The line
number associated with GOTO, CONTINUE, BEGIN REPORT, GOSUB, or
CONVERT, or the line number used in a command such as SAVE,
FIND, or GET is not in the line range [1, 999999].
ACTION Use a line number in the range [1, 999999].
-----------------------------------------------------------------------------
MESSAGE This statement is not allowed in a COMMAND statement.
CAUSE This is a substitute message for error number 68. Illegal
syntax in a COMMAND statement. For example
10 COMMAND "if a then input b"
The error will only be generated with command strings that
contain the following keywords: FLUSH INPUT, ENTER, INPUT,
LENTER, ACCEPT, COMMAND, LINPUT, MAT INPUT, MAT READ, PAUSE, or
TINPUT.
ACTION Modify the quoted string literal or the value of the string
variable following the COMMAND keyword so that it does not
include any of the above keywords.
-----------------------------------------------------------------------------
MESSAGE The class of an active subunit may not be changed.
CAUSE This is a substitute message for error number 68. A program
line that is a procedure header line, (SUB), has been replaced
during editing with a program line that is a function header,
(DEF), or vice versa.
ACTION Procedure and function header lines cannot replace each other.
If you want to change a procedure to a function or vice versa,
enter the new header line at the end of the current program and
use the COPY command to copy the body. Next, do a DEL SUB of
the original header and body.
-----------------------------------------------------------------------------
MESSAGE The generic type (string/number) of an active function may not
change.
CAUSE This is a substitute message for error number 68. The type of
value returned by a function was changed when the program was
paused or halted while in the function. A numeric type was
changed to a string type or vice versa.
ACTION Allow the program execution to terminate and then make the
required changed.
-----------------------------------------------------------------------------
MESSAGE Number after ' in string is not between 0 and 255.
CAUSE The singe quote (') in a string literal is used to denote a
character by its ASCII equivalent number. For 8-bit
characters, these numbers can range from 0 to 255. A single
quote was encountered followed by a number greater than 255.
ACTION Determine the correct number for the desired character.
-----------------------------------------------------------------------------
MESSAGE A number between 0 and 255 must follow ' in the string.
CAUSE A single quote was encountered in a string literal and was not
followed by a digit.
ACTION Determine the correct ASCII character number for the desired
character and place it after the '.
-----------------------------------------------------------------------------
MESSAGE Unknown character " " found (ASCII nnn).
CAUSE A character was encountered which was not in the set of legal
HP Business BASIC/XL characters.
ACTION If the character was entered inadvertently, retype the line
(using REDO is not recommended). If the illegal character is
part of a string, use the singe quote (') notation to specify
the character.
-----------------------------------------------------------------------------
MESSAGE Parser stack overflow. Statement too complex.
CAUSE The statement entered was so complex that HP Business BASIC/XL
was unable to process it without overflowing internal tables.
ACTION Break up the line into at least two less complex statements.
-----------------------------------------------------------------------------
MESSAGE This statement is not allowed in this context.
CAUSE A statement has been entered in a place in the program where it
cannot legally go. For example, a SUB statement was entered in
the middle of another subunit or a GLOBAL statement was used in
a subunit other than MAIN.
ACTION Add new SUBs and multi-line DEFs only at the end of the
program. Use GLOBAL statements only in MAIN.
-----------------------------------------------------------------------------
MESSAGE Could not create number from input line text.
CAUSE A statement was entered with an invalid line number.
ACTION Use an integer line number in the range [1, 999999].
-----------------------------------------------------------------------------
MESSAGE OPTION BASE must use 0 or 1.
CAUSE An OPTION BASE statement was entered specifying a base other
than zero or one.
ACTION If arrays are to have lower bounds other than zero or one,
those bounds must be explicitly stated in the array
declaration. Only zero or one is specified as the default
lower bound with the OPTION statement or HPBBCNFG.Pub.Sys.
-----------------------------------------------------------------------------
MESSAGE Whole array reference illegal in this context.
CAUSE A whole array reference (an array name followed by an asterisk
with parentheses) has been used where only a scalar or simple
data item is allowed.
ACTION Use the MAT statements to manipulate whole arrays.
-----------------------------------------------------------------------------
MESSAGE Variably dimensioned arrays and strings illegal in MAIN
program.
CAUSE A variable has been used to declare the array size or the
string length in a string array declaration, and this is not
allowed in MAIN.
ACTION Declare the array dimension or the string length explicitly in
MAIN.
-----------------------------------------------------------------------------
MESSAGE Improper string length declaration.
CAUSE A variable instead of a constant has been used to declare the
length of a string declaration in MAIN.
ACTION Declare the sting length explicitly in MAIN.
-----------------------------------------------------------------------------
MESSAGE Either DATASET or ITEMS clause must be given.
CAUSE A statement that requires a DATASET or ITEMS clause has been
entered with neither a DATASET nor an ITEMS clause.
ACTION Provide the required clause.
-----------------------------------------------------------------------------
MESSAGE You may not specify both the DATASET and the ITEMS clause.
CAUSE The DBINFO statement does not allow both the DATASET and ITEMS
clauses.
ACTION Check the DBINFO mode to specify either the ITEMS clause or the
DATASET clause, but not both.
-----------------------------------------------------------------------------
MESSAGE You may not specify both the DATASET and the DESCRIPTOR
clauses.
CAUSE The DBLOCK statement does not allow both the DATASET and the
DESCRIPTOR clauses.
ACTION Check the LOCK mode. If the LOCK mode is 3 or 4, specify the
DATASET clause. If the LOCK mode is 5 or 6, specify the
DESCRIPTOR clause.
-----------------------------------------------------------------------------
MESSAGE This statement is not allowed in an IF statement typed from the
keyboard.
CAUSE A statement performing terminal input has been included as part
of an IF statement entered without a line number.
ACTION None. Terminal input statements are not allowed from the
keyboard. Place the statement in a program.
-----------------------------------------------------------------------------
MESSAGE No more than 8 keys may be specified in this state.
CAUSE An ON KEY or OFF KEY statement has a list of more than eight
key numbers.
ACTION Modify the statement to specify no more than eight keys.
-----------------------------------------------------------------------------
MESSAGE Between 1 and 8 keys must be specified in this statement.
CAUSE An ON KEY statement did not specify any key numbers or
specified more than eight key numbers.
ACTION Correct the statement to include at least one but not more than
eight keys.
-----------------------------------------------------------------------------
MESSAGE Only =, >=, and <= are allowed here.
CAUSE An invalid relational operator was specified in the PREDICATE
statement.
ACTION Check the relational operator. Only =, >=, and <= are allowed
in the PREDICATE statement.
-----------------------------------------------------------------------------
MESSAGE Illegal line number: !
CAUSE GET (of an ASCII file), LINK, or MERGE has created a line
reference that is greater than 999999.
ACTION Renumber using a lower line number.
-----------------------------------------------------------------------------
MESSAGE Built-in function xxx has wrong type in parameter nn.
CAUSE In the parameter list of built-in function xxx, a string was
found where a numeric value was required or a numeric value was
found where a string was required.
ACTION Check the syntax for the built-in function and use the correct
parameter types.
-----------------------------------------------------------------------------
MESSAGE Wrong number of arguments for built-in function xxx.
CAUSE A built-in function xxx was used with the wrong number of
arguments.
ACTION Check the syntax for the built-in function and use the correct
number of arguments.
-----------------------------------------------------------------------------
MESSAGE Operators not allowed in array built-in functions.
CAUSE Only an array variable is allowed in the MAT built-in function.
ACTION Put an array variable inside the MAT built-in function. Put a
parentheses around the built-in function to assign a value to
an array.
-----------------------------------------------------------------------------
MESSAGE Built-in function "name" not allowed here.
CAUSE The built-in function used in the MAT assign statement is
invalid.
ACTION Check the built-in function name.
-----------------------------------------------------------------------------
MESSAGE Illegal character in data item or missing data items.
CAUSE Only the following are legal separators for the data items in
the DATA statement:
,
;
!
ACTION Check the syntax of the DATA statement.
-----------------------------------------------------------------------------
MESSAGE Empty arguments not allowed in built-in functions.
CAUSE Unexpected empty arguments, ", ,", are specified as parameters
to a built-in function.
ACTION Specify a value between the commas.
-----------------------------------------------------------------------------
MESSAGE New array bounds must be specified in REDIM statement.
CAUSE New array dimensions were not specified in a REDIM statement.
ACTION Specify the new array bounds.
-----------------------------------------------------------------------------
MESSAGE Undefined variable or improperly used keyword.
CAUSE A line has been entered for immediate execution that has an
unknown identifier. This may be an undefined variable or a
keyword that has been misspelled or misplaced.
ACTION Do not attempt to use an undefined variable in the calculator.
-----------------------------------------------------------------------------
MESSAGE BREAK ... WHEN ... BY requires a numeric control expression.
CAUSE A numeric control expression representing a "step" value for
triggering breaks is required in the BY clause.
ACTION Change the syntax to use only numeric expressions in the BY
clause.
-----------------------------------------------------------------------------
MESSAGE The WRITE FORM statement requires at least one clause.
CAUSE You must specify at least one clause in the WRITE FORM
statement.
ACTION Check the syntax of the statement in the Help Catalog or the HP
Business BASIC/XL Reference Manual to be certain that you are
using the correct syntax.
-----------------------------------------------------------------------------
MESSAGE This CHANGE command cannot change the type of a variable.
CAUSE The CHANGE <vars> command allows variable names to be changed
to a new name. However, you are not allowed to change the type
of a variable from numeric to string or vice versa.
ACTION Do not attempt to change the type of a variable with the CHANGE
<vars> command.
-----------------------------------------------------------------------------
MESSAGE Line too long to process the CHANGE command.
CAUSE The CHANGE command exceeds 500 characters.
ACTION Shorten the CHANGE command to 500 characters or fewer.
-----------------------------------------------------------------------------
MESSAGE This statement or phrase applies only on MPE V systems.
CAUSE You have used a feature that is only available on MPE V
systems. For example, SPL language is not allowed in the
EXTERNAL statement on MPE XL systems.
ACTION Check your program and use the correct syntax for MPE XL.
Rewrite any SPL programs that will be called by HP Business
BASIC/XL.
-----------------------------------------------------------------------------
MPE/iX 5.0 Documentation