Sheerpower®
A Guide to the Sheerpower Language


Previous Contents Index


Appendix B
Reserved Words

Reserved words are words that cannot be used as identifiers. Sheerpower's reserved words are:

DATE
DATE$
ELSE
EXLINE
EXTYPE
MAXNUM
NOT
PI
PRINT
REM
RND
TIME
TIME$


Appendix C
Sheerpower Error and Exception Messages

In the Sheerpower console window, errors are returned either immediately after typing a syntactically incorrect line, or when the RUN command is given and your program is syntactically incorrect.

Errors happen when the program is compiling. Exceptions happen as the program is running.

In the case that the error happens outside of a routine (in the main logic area) the first digit is always a 1 followed by a period. Following the period is the source code line number.

I.E., 1.45 means the error occurred in the 45th line from the top of the file.

I.E., do_totals.3 means the error occurred in 3 lines from the definition of the routine called do_totals.

In SPDEV the Alt + UP or DOWN arrow key can be used to move up or down a specific number of lines in your file. For more specialized programming keystrokes in SPDEV, see Appendix F, Keystrokes for Sheerpower Rapid Development Environment.

C.1 Compile Errors

ACCESS mode not INPUT, OUTPUT, or OUTIN
ADD without matching END ADD
Already declared as other than array
Array name expected
Array not yet dimensioned
Array or structure reference is missing "()"
Bad line number
CANCEL ADD without matching ADD
CANCEL EXTRACT without matching EXTRACT
Can't find relation in database
Can't GO
Can't store into an internal field
Can't use this option with FIELD clause
CASE expression is of different type than SELECT CASE
CASE statement missing 'TO'
CASE without matching SELECT CASE
CASE OF not within SELECT block
Compilation errors
Compiler doesn't handle this yet
Database engine discovered bad binary information buffer
Datatype mismatch
DO without matching LOOP
Dots not allowed in variable names
Dynamic variables may not be used as arrays
ELSE without matching IF
END ADD without matching ADD
END EXTRACT without matching EXTRACT or REEXTRACT
END IF without matching IF
END HANDLER without matching HANDLER
END SELECT not within SELECT block
END WHEN without a previous USE
EXIT ADD without matching ADD
EXIT EXTRACT without matching EXTRACT
EXPECTED KEY keyword
EXTRACT without matching END EXTRACT
Expected a line number or label
Expected a relational operator
Expected an expression
Expected ELSE clause
Expected end-of-line
Expected EXCEPTION keyword
Expected FIELD keyword
Expected file name expression
Expected IN or USE keywords
Expected INPUT keyword
Expected 'ON' or 'OFF'
Expected quoted string
Expected RECORD keyword
Expected STEP keyword
Expected STRUCTURE keyword
Expected THEN clause
Expected ','
Expected ':' in substring expression
Expected ',' or ':'
Expected ',' or ';'
Expected ',' or ')'
Expected '('
Expected ')'
Expected '='
Expression poorly formed
Expression too complex
EXTRACT without matching END EXTRACT
INPUT missing variable list
Invalid file name
Invalid relation name
Invalid routine name
Invalid workspace name
FOR EACH may not appear within and EXTRACT
FOR index must be real or integer simple variable
FOR without matching NEXT
Function or array not declared
GOTO or GOSUB expected
HANDLER name not found
HANDLER or FUNCTION name cannot be used as a label
HANDLER without matching END HANDLER
IF without matching END IF
Illegal ADD STRUCTURE nesting
Illegal character in source code
Illegal delimiter
Illegal EXTRACT nesting
Illegal integer
Illegal structure field name
Illegal use of dynamic variable/structure in CASE
Illegally nested error handlers
Illegally nested PROGRAM statement
INCLUDE, EXCLUDE, or SORT outside EXTRACT block
Internal END-ON without preceding ON
Invalid NEXT variable
Leading white space not within a multiple statement line
Line number or label not found
LOOP without matching DO
LSET, CSET, and RSET require string assignments
Missing operand
Missing '=' in FOR statement
Missing ':' in substring expression
Missing '('
Missing ')'
More than 32 dimensions not allowed
Multiply defined HANDLER
Multiply defined label
Nested FOR loops with same index variable
NEXT without matching FOR
No END statement terminating PROGRAM block
Not existing HANDLER name
Only one OPTION BASE allowed per program
Only one OPTION integer/real allowed per program
OPEN statement missing NAME keyword
PARTIAL only allowed for character fields
PROGRAM statement not first in program
Relation name expected
REPEAT DO or ITERATE DO not inside DO loop
REPEAT FOR, ITERATE FOR, or EXIT FOR not in FOR loop
Reserved word
RESUME, RETRY, CONTINUE, or EXIT HANDLER not within handler
SELECT CASE without matching END SELECT
SELECT has no matching END SELECT
Statement following LOOP is not WHILE or UNTIL
Statement is only legal in immediate mode
Statement must be inside a program
Structure name expected
Syntax error
Syntax error in specified expression
This option needs a FIELD clause
Too many relations declared
Too many structures in the relation
Tried to DECLARE an illegal or typed variable
Unexpected number of dimensions
Unknown special variable
Unrecognized COMPILE option
Unrecognized keyword
Unrecognized OPEN keyword
Unrecognized relational operator
Unrecognized SET/ASK keyword
Unrecognized statement
Unterminated ELSEIF statement
USE block has no END WHEN
Use of '()' not valid in this context
USE without preceding WHEN EXCEPTION IN...
Using '()' with array name not valid in this context
Variable already declared
Variable currently exists with a different data type
Variable names may not contain embedded dots
Valid OPTION BASE parameters are 0 and 1
Warning: Missing quote assumed
WHEN EXCEPTION IN has no USE block
WHEN EXCEPTION USE has no END WHEN
WHEN may not be inside of a HANDLER or USE block
WHILE/UNTIL or EXIT DO not inside DO loop
Wrong number of arguments
Wrong number of subscripts in array reference

C.2 Exceptions

Exceptions only occur during execution. The runtime exceptions are:

  Too many GOSUBs
  User CAUSED exception
  Improper entry to error handler detected
  Dynamic variable used but not assigned
  Upper bound is less than lower bound
  File already exists (use REPLACE)
  Datatype mismatch
  Statistics are not enabled
-1001 Program interrupted
-1002 Source code changed
-3101 Dynamic variable datatype mismatch
-3102 Nonexistent structure field referenced
-4001 Illegal digit in decoded string
-4002 Numeric base in DECODE/ENCODE$ not between 2 and 16
-4003 Illegal argument to ORDNAME$()
-4004 Illegal argument to date$
-4005 Illegal argument to DAYS
-4006 Invalid logical value
-4007 Invalid input screen format
-4008 Illegal memory address to MEM function
-4009 Illegal argument to ENCODE$()
-4010 Illegal argument to CHARSET$()
-4016 Illegal length argument
-4017 Expression or statement invalid
-4021 Illegal validation rule
-7011 Must close structure before reusing structure name
-7012 Error in directory name
-7013 Invalid attempt to update a key field
-7014 Deadlock detected
-7015 Database engine rejected add or update
-5001 Program interrupted
-5002 Exceeded virtual memory
-7001 Miscellaneous file error
-7002 Error in structure file
-7003 Error in data dictionary
-7004 Error in data file
-7005 No privilege for operation
-7006 No such record
-7007 Not a key field
-7008 Unknown DBMS in structure
-7009 Duplicate key
-7010 File full
-8001 Structure reference of nonexistent field
-8002 Numeric conversion error
-8003 Unsupported field data type
-8004 Disk quota exceeded
-8102 Syntax error in DATA
-10001 Illegal passing mechanism
-10002 Can't call external routine
-10003 Error in external routine
-10004 Dispatch routine not found
-10005 Illegal symbol name
-10006 Setting symbol failed
-10007 Ambiguous symbol definition
1001 Illegal number
1002 Integer overflow
1002 Floating overflow
1003 Overflow in built-in function
1004 Overflow in evaluating VAL
1006 Overflow on READ number
1007 Overflow in numeric input from terminal
1051 Overflow in evaluating string expression
1053 Overflow on READ string
1054 String too long on input
2001 Subscript out of bounds
3001 Division by zero
3002 Negative number raised to a nonintegral power
3003 Zero raised to negative power
3004 LOG() of zero or negative number
3005 SQRT() of negative number
3006 MOD or REM had zero divisor
3007 Argument to ACOS or ASIN not in range -1<=X<=1
3008 Attempt to evaluate ANGLE(0,0)
4001 Illegal argument to VAL()
4002 Illegal argument to CHR$()
4003 Illegal argument to ORD()
4004 Illegal argument to SIZE
4005 Index in TAB less than one
4006 SET MARGIN value less than zonewidth
4007 SET ZONEWIDTH value greater than margin
4008 LBOUND index out of range
4009 UBOUND index out of range
4010 Second argument to REPEAT$ < 0
5001 REDIM overflow
6005 REDIM first index greater than second
7001 Bad channel number
7002 Attempt to open or close channel zero
7003 Channel number already in use
7004 File not open
7100 Invalid file attribute
7101 Too many files open
7110 File not found
7112 File locked by another user
7120 Illegal file name
7305 No current record
7322 Delete or update not allowed
8001 Out of DATA
8002 Too few input items
8003 Too many input items
8011 End of file on input
8012 Too few data items in record
8013 Too many data items in record
8101 READ a non-number
8102 Syntax error in input
8103 Non-numeric input when number expected
8105 Invalid file input
8201 Bad format$() or using string
8301 Record is larger than record size
8401 Timeout on input
8402 Illegal numeric value for time-expression
10001 ON index out of range
10002 RETURN without GOSUB
10004 SELECT found no matching CASE
10005 Chained program unavailable


Previous Next Contents Index