For all error tables:

When the SPHEREserver PASCAL test detects an error condition, it cancels the function in progress and calls
the internal error reporting function with a message indicating the type of error.

More detailed documentation concerning errors will be forthcoming.

/*
	Abort codes for fatal translator errors.

	The following table shows the values of error codes generated..

	These errors are basic executable errors. They may happen at any point
	in the parsing and interpreting process and will always cause an execution
	abort (for now).

	Note:	The possible values of Error, and their meanings, may change in future
		releases.

	The standard error action is to display the message in this form:

	*** Fatal translator error: <error text here>

*/

Error					Integer Value	Text message
================================================================================================
ABORTCODE_NONE				-11		reserved
ABORTCODE_START				-10		reserved
ABORTCODE_UNIMPLEMENTEDFEATURE		ABORTCODE_START	Unimplemented feature
ABORTCODE_RUNTIMEERROR			-9		Runtime error
ABORTCODE_NESTINGTOODEEP		-8		Nesting too deep
ABORTCODE_CODESEGMENTOVERFLOW		-7		Code segment overflow
ABORTCODE_STACKOVERFLOW			-6		Stack overflow
ABORTCODE_TOOMANYSYNTAXERRORS		-5		Too many syntax errors
ABORTCODE_ASSEMBLYFILEOPENFAILED	-4		Failed to open assembly file
ABORTCODE_IFORMFILEOPENFAILED		-3		Failed to open intermediate form file
ABORTCODE_SOURCEFILEOPENFAILED		-2		Failed to open source file
ABORTCODE_INVALIDCOMMANDLINEARGS	-1		Invalid command line arguments
ABORTCODE_QTY				0		reserved



/*
	Error codes for syntax errors.

	These errors are all sytax related. They can only occur in the parsing 
	process, if there are any syntax errors, the executor will not be invoked.

	Note:	The possible values of Error, and their meanings, may change in future
		releases of SPASCAL

	The standard error action is to display the message in this form:

	*** ERROR: <error message text here>
	additionally a pointer arrow will point at the offending code in the affected line
*/

Error					Integer Value	Text message
================================================================================================
ERRORCODE_NONE				0		No error
ERRORCODE_UNRECOGNIZABLE		1		Unrecognizable input
ERRORCODE_TOOMANY			2		Too many syntax errors
ERRORCODE_UNEXPECTEDENDOFFILE		3		Unexpected end of file
ERRORCODE_INVALIDNUMBER			4		Invalid number
ERRORCODE_INVALIDFRACTION		5		Invalid fraction
ERRORCODE_INVALIDEXPONENT		6		Invalid exponent
ERRORCODE_TOOMANYDIGITS			7		Too many digits
ERRORCODE_REALOUTOFRANGE		8		Real literal out of range
ERRORCODE_INTEGEROUTOFRANGE		9		Integer literal out of range
ERRORCODE_MISSINGRIGHTPAREN		10		Missing )
ERRORCODE_INVALIDEXPRESSION		11		Invalid expression
ERRORCODE_INVALIDASSIGNMENT		12		Invalid assignment statement
ERRORCODE_MISSINGIDENTIFIER		13		Missing identifier
ERRORCODE_MISSINGCOLONEQUAL		14		Missing :=
ERRORCODE_UNDEFINEDIDENTIFIER		15		Undefined identifier
ERRORCODE_STACKOVERFLOW			16		Stack overflow
ERRORCODE_INVALIDSTATEMENT		17		Invalid statement
ERRORCODE_UNEXPECTEDTOKEN		18		Unexpected token
ERRORCODE_MISSINGSEMICOLON		19		Missing ;
ERRORCODE_MISSINGCOMMA			20		Missing ,
ERRORCODE_MISSINGDO			21		Missing DO
ERRORCODE_MISSINGUNTIL			22		Missing UNTIL
ERRORCODE_MISSINGTHEN			23		Missing THEN
ERRORCODE_INVALIDFORCONTROL		24		Invalid FOR control variable
ERRORCODE_MISSINGOF			25		Missing OF
ERRORCODE_INVALIDCONSTANT		26		Invalid constant
ERRORCODE_MISSINGCONSTANT		27		Missing constant
ERRORCODE_MISSINGCOLON			28		Missing :
ERRORCODE_MISSINGEND			29		Missing END
ERRORCODE_MISSINGTOORDOWNTO		30		Missing TO or DOWNTO
ERRORCODE_REDEFINEDIDENTIFIER		31		Redefined identifier
ERRORCODE_MISSINGEQUAL			32		Missing =
ERRORCODE_INVALIDTYPE			33		Invalid type
ERRORCODE_NOTATYPEIDENTIFIER		34		Not a type identifier
ERRORCODE_INVALIDSUBRANGETYPE		35		Invalid subrange type
ERRORCODE_NOTACONSTANTINDENTIFIER	36		Not a constant identifier
ERRORCODE_MISSINGDOTDOT			37		Missing ..
ERRORCODE_INCOMPATIBLETYPES		38		Incompatible types
ERRORCODE_INVALIDTARGET			39		Invalid assignment target
ERRORCODE_INVALIDIDENTIFIERUSAGE	40		Invalid identifier usage
ERRORCODE_INCOMPATIBLEASSIGNMENT	41		Incompatible assignment
ERRORCODE_MINGTMAX			42		Min limit greater than max limit
ERRORCODE_MISSINGLEFTBRACKET		43		Missing [
ERRORCODE_MISSINGRIGHTBRACKET		44		Missing ]
ERRORCODE_INVALIDINDEXTYPE		45		Invalid index type
ERRORCODE_MISSINGBEGIN			46		Missing BEGIN
ERRORCODE_LCURLY			47		Missing {
ERRORCODE_RCURLY			48		Missing }
ERRORCODE_MISSINGPERIOD			49		Missing .
ERRORCODE_TOOMANYSUBSCRIPTS		50		Too many subscripts
ERRORCODE_INVALIDFIELD			51		Invalid field
ERRORCODE_INVALIDMEMBER			52		Invalid object member
ERRORCODE_NESTINGTOODEEP		53		Nesting too deep
ERRORCODE_MISSINGPROGRAM		54		Missing PROGRAM
ERRORCODE_ALREADYFORWARDED		55		Already specified in FORWARD
ERRORCODE_FUNCTIONREDECLARED		56		Function already declared
ERRORCODE_WRONGNUMBEROFPARAMS		57		Wrong number of actual parameters
ERRORCODE_INVALIDVARPARM		58		Invalid VAR parameter
ERRORCODE_INVALIDVARIABLEDECL		59		Invalide variable declaration
ERRORCODE_NOTARECORDVARIABLE		60		Not a record variable
ERRORCODE_MISSINGVARIABLE		61		Missing variable
ERRORCODE_CODESEGMENTOVERFLOW		62		Code segment overflow
ERRORCODE_UNIMPLEMENTEDFEATURE		63		Unimplemented feature
ERRORCODE_INVALIDHEXADECIMALFORMAT	64		Invalid hexadecimal format
ERRORCODE_ILLEGALROUTINEDECL		65		Illegal routine declaration in record type
ERRORCODE_INVALIDVARIABLEREFERENCE	66		Invalid variable reference
ERRORCODE_METHODIDENTIFIEREXPECTED	67		Method identifier expected
ERRORCODE_METHODIDALREADYDEFINED	68		Method already defined
ERRORCODE_UNDEFINEDFORWARD		69		Undefined forward
ERRORCODE_HEADERDOESNOTMATCH		70		Header does not match previous definition
ERRORCODE_VARIABLEIDENTIFIEREXPECTED	71		Variable identifier expected
ERRORCODE_CANNOTREADORWRITE		72		Cannot Read or Write variables of this type
ERRORCODE_POINTERVARIABLEEXPECTED	73		Pointer variable expected
ERRORCODE_CONSTRUCTORIDENTIFIEREXPECTED	74		Constructor identifier expected

/*
	Error codes for run time errors.

	These errors can only occur during execution and while in debug mode.
	If it occurs during execution, the running program will halt. Runtime errors
	which occur during debug mode do not halt execution upon leaving debug mode (I hope).

	Note:	The possible values of Error, and their meanings, may change in future
		releases.

	The standard error action is to display the message in this form:
	
	*** RUNTIME ERROR in line x: <error message text here>

	Although these messages usually indicate user programming errors, they may also be
	caused by programming errors (bugs) in SPASCAL itself. If you can't find anything wrong
	with your program, fill out a Bug Report form and post it in our Bug Forum at 
                www.sphereserver.com in the discussion section of the website.  Be sure to put PASCAL 
                in the subject line of your post and include contact info and a copy of your code.
*/

Error					Integer Value	Text message
================================================================================================
RTERROR_NONE				0		No runtime error
RTERROR_STACKOVERFLOW			1		Runtime stack overflow
RTERROR_VALUEOUTOFRANGE			2		Value out of range
RTERROR_INVALIDCASEVALUE		3		Invalid CASE expression value
RTERROR_DIVISIONBYZERO			4		Division by zero
RTERROR_INVALIDFUNCTIONARGUMENT		5		Invalid standard function argument
RTERROR_INVALIDUSERINPUT		6		Invalid user input
RTERROR_UNIMPLEMENTEDFEATURE		7		Unimplemented runtime feature
