1// This file is part of SmallBASIC
2//
3// SB Messages in English - Latin1
4//
5// This program is distributed under the terms of the GPL v2.0 or later
6// Download the GNU Public License (GPL) from www.gnu.org
7//
8// Copyright(C) 2000 Nicholas Christopoulos
9
10#define LOWER_CHAR_FOR_YES 'y'
11#define WORD_FILE "File"
12#define WORD_SECTION "Section"
13
14#define TABLE_WEEKDAYS_3C { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }
15#define TABLE_WEEKDAYS_FULL { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" }
16#define TABLE_MONTH_3C { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }
17#define TABLE_MONTH_FULL { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }
18
19#define DATEFMT_DAY_U 'D'
20#define DATEFMT_DAY_L 'd'
21#define DATEFMT_MONTH_U 'M'
22#define DATEFMT_MONTH_L 'm'
23#define DATEFMT_YEAR_U 'Y'
24#define DATEFMT_YEAR_L 'y'
25
26#define RES_NUMBER_OF_VARS "Number of variables %d (%d)\n"
27#define RES_NUMBER_OF_LABS "Number of labels %d\n"
28#define RES_NUMBER_OF_UDPS "Number of UDFs/UDPs %d\n"
29#define RES_CODE_SIZE "Code size %d\n"
30#define RES_IMPORTED_LIBS "Imported libraries %d\n"
31#define RES_IMPORTED_SYMS "Imported symbols %d\n"
32#define RES_EXPORTED_SYMS "Exported symbols %d\n"
33#define RES_FINAL_SIZE "Final size %d\n"
34
35// compiler
36#define MSG_WRONG_PROCNAME "Wrong procedure/function name: %s"
37#define MSG_EXP_MIS_DQ "Expression: Missing (\"), string remains open"
38#define MSG_EXP_MIS_RP "Expression: Missing \')\'"
39#define MSG_EXP_MIS_LP "Expression: Missing \'(\'"
40#define MSG_EXP_MIS_RB "Expression: Missing \'}\'"
41#define MSG_LABEL_NOT_DEFINED "Label '%s' is not defined"
42#define MSG_WRONG_UNIT "Unknown unit '%s'; use IMPORT\n"
43#define MSG_NEW_LABEL "%d: new label [%s], index %d\n"
44#define MSG_NEW_UDP "%d: new UDP/F [%s], index %d\n"
45#define MSG_NEW_VAR "%d: new VAR [%s], index %d\n"
46#define MSG_WRONG_VARNAME "Wrong variable name: %s"
47#define MSG_EXP_GENERR "Error on numeric expression"
48#define MSG_BF_ARGERR "Built-in function %s: without parameters"
49#define MSG_KEYWORD_DO_ERR "Keyword DO not allowed here"
50#define MSG_STATEMENT_ON_RIGHT "Statement %s must be on the left side (the first keyword of the line)"
51#define MSG_OPR_APPEND_ERR "operator << not allowed here"
52#define MSG_WRONG_OPR "Unknown operator: '%c'"
53#define MSG_PARNUM_LIMIT "Parameters limit: %d"
54#define MSG_NIL_PAR_ERR "'Empty' parameters are not allowed"
55#define MSG_MISSING_CHAR "Missing '%c'"
56#define MSG_ARRAY_SE "Array: syntax error"
57#define MSG_ARRAY_MIS_RP "Array: Missing ')', (left side of expression)"
58#define MSG_ARRAY_MIS_LP "Array: Missing '(', (left side of expression)"
59#define MSG_OPTION_ERR "OPTION: Unrecognized option '%s'"
60#define MSG_IT_IS_KEYWORD "%s: is keyword (left side of expression)"
61#define MSG_USE_DECL "Use DECLARE with SUB or FUNC keyword"
62#define MSG_LET_MISSING_EQ "LET/CONST/APPEND: Missing '='"
63#define MSG_EXIT_ERR "Use EXIT [FOR|LOOP|SUB|FUNC]"
64#define MSG_UDP_ALREADY_EXISTS "The SUB/FUNC %s is already defined"
65#define MSG_MISSING_UDP_BODY "Block not found with FUNC/DEF declared using '='"
66#define MSG_UNIT_NAME_MISSING "EXPORT: Unit name is not defined"
67#define MSG_ON_GOTO_ERR "ON x GOTO WHERE?"
68#define MSG_ON_GOSUB_ERR "ON x GOSUB WHERE?"
69#define MSG_ON_NOTHING "ON WHAT?"
70#define MSG_FOR_NOTHING "FOR: Missing '=' OR 'IN'"
71#define MSG_FOR_COUNT_ERR "FOR: %s is not a variable"
72#define MSG_FOR_ARR_COUNT "FOR: %s is an array. Arrays are not allowed"
73#define MSG_SPECIAL_KW_ERR "%s: Wrong position"
74#define MSG_DETAILED_REPORT_Q "Detailed report (y/N) ?"
75#define MSG_PASS2_COUNT "\rPASS2: Node %d/%d"
76#define MSG_UDP_MISSING_END "SUB/FUNC: Missing END on the same level"
77#define MSG_MISSING_NEXT "FOR: Missing NEXT on the same level"
78#define MSG_MISSING_IN "FOR: Missing IN"
79#define MSG_MISSING_TO "FOR: Missing TO"
80#define MSG_MISSING_WEND "WHILE: Missing WEND on the same level"
81#define MSG_MISSING_UNTIL "REPEAT: Missing UNTIL on the same level"
82#define MSG_MISSING_ENDIF_OR_ELSE "IF: Missing ELIF/ELSE/ENDIF on the same level"
83#define MSG_MISSING_ENDIF "(ELSE) IF: Missing ENDIF on the same level"
84#define MSG_MISSING_WHILE "WEND: Missing WHILE on the same level"
85#define MSG_MISSING_REPEAT "UNTIL: Missing REPEAT on the same level"
86#define MSG_MISSING_FOR "NEXT: Missing FOR on the same level"
87#define MSG_MISSING_IF "ENDIF: Missing IF on the same level"
88#define MSG_MEMBER_DOES_NOT_EXIST "Unit has no member named '%s'\n"
89#define MSG_MODULE_NO_MEMBER "Module '%s' has no member '%s'\n"
90#define MSG_MODULE_NO_RETURN "Module FUNC '%s' result not assigned\n"
91#define MSG_CANT_OPEN_FILE_AT "Can't open '%s' at '%s'\n"
92#define MSG_CANT_OPEN_FILE "Can't open '%s'\n"
93#define MSG_GRMODE_ERR "GRMODE, usage:<width>x<height>[x<bits-per-pixel>]\nExample: OPTION PREDEF GRMODE=640x480x4\n"
94#define MSG_UNIT_NOT_FOUND "Unit %s.sbu not found or wrong version"
95#define MSG_IMPORT_FAILED "Unit %s.sbu, import failed"
96#define MSG_INVALID_UNIT_NAME "Invalid unit name"
97#define MSG_UNIT_ALREADY_DEFINED "Unit name already defined"
98#define MSG_OPT_PREDEF_ERR "OPTION PREDEF: Unrecognized option '%s'"
99#define MSG_MANY_UNIT_DECL "Use 'Unit' keyword only once"
100#define MSG_INC_MIS_DQ "#INC: Missing \""
101#define MSG_INC_FILE_DNE "File %s: File %s does not exist"
102#define MSG_INC_FILE_INC "File %s: File cannot include itself"
103#define MSG_UDP_ALREADY_DECL "SUB/FUNC %s already defined"
104#define MSG_UDP_MIS_END_2 "File %s: SUB/FUNC: Missing END (possibly in %s)"
105#define MSG_PASS1 "Pass1...\n"
106#define MSG_PASS1_COUNT "\rPASS1: Line %d"
107#define MSG_UNDEFINED_UDP "Undefined SUB/FUNC code: %s"
108#define MSG_UNDEFINED_MAP "Undefined MAP: '%s' or missing parenthesis"
109#define MSG_PASS1_FIN "\rPASS1: Line %d; finished\n"
110#define MSG_EXP_SYM_NOT_FOUND "Export symbol '%s' not found"
111#define MSG_PASS2 "PASS2..."
112#define MSG_MISSING_END_3 "SUB/FUNC: Missing END"
113#define MSG_LOOPS_OPEN "%d loop(s) remains open"
114#define MSG_CREATING_UNIT "\nCreating Unit %s...\n"
115#define MSG_CREATING_BC "Creating byte-code...\n"
116#define MSG_UNIT_NAME_DIF_THAN_SRC "Warning: unit's file name is different than source\n"
117#define MSG_BC_FILE_CREATED "ByteCode file '%s' created\n"
118#define MSG_BC_FILE_ERROR "Can't create binary file\n"
119#define MSG_CASE_CASE_ELSE "CASE following CASE ELSE"
120#define MSG_MISSING_END_SELECT "SELECT/CASE without 'END SELECT'"
121#define MSG_MISSING_SELECT "END SELECT without SELECT"
122#define MSG_MISSING_CASE "SELECT without CASE"
123#define MSG_MISSING_CATCH "TRY without CATCH"
124#define MSG_MISSING_ENDTRY "TRY without END TRY"
125#define MSG_FUNC_NOT_ASSIGNED "The value returned from %s was not assigned"
126#define MSG_RETURN_NOT_ASSIGNED "FUNC (line %d) - result not assigned"
127
128// executor
129#define WORD_ERROR_AT "ERROR AT"
130#define WORD_DESCRIPTION "Description"
131#define WORD_COMP "COMP" // Compiler (COMP) error or RunTime error (RTE)
132#define WORD_RTE "RTE"
133#define WORD_DONE "DONE"
134#define WORD_BREAK_AT "BREAK AT LINE"
135#define WORD_INPUT_REDO "REDO FROM START"
136#define WORD_GOTO "GOTO"
137#define WORD_GOSUB "GOSUB"
138#define WORD_INF "INF" // infinity
139#define FSERR_INVALID_PARAMETER "FS: Invalid parameter"
140#define FSERR_NOT_FOUND "FS: File not found"
141#define FSERR_HANDLE "FS: Invalid file handle"
142#define FSERR_ACCESS "FS: Access denied"
143#define FSERR_GENERIC "FS: Generic I/O error"
144#define FSERR_FMT "FS(%d): %s"
145#define FSERR_TOO_MANY_FILES "FS: Too many open files"
146#define FSERR_WRONG_DRIVER "Unknown device or file-system"
147#define ERR_MISSING_RP "Missing ')' OR invalid number of parameters"
148#define ERR_MATRIX_DIM "Matrix dimension error"
149#define ERR_SYNTAX "Syntax error"
150#define ERR_MISSING_SEP "Missing separator '%c'"
151#define ERR_PARCOUNT "Error number of parameters"
152#define ERR_STACK_OVERFLOW "Stack overflow"
153#define ERR_STACK_UNDERFLOW "Stack underflow"
154#define ERR_STACK "Stack mess (Cannot use call to SUB with an expression)"
155#define ERR_ARRAY_MISSING_LP "Array: Missing '('"
156#define ERR_ARRAY_MISSING_RP "Array: Missing ')'"
157#define ERR_ARRAY_RANGE "Array: Index '%d' out of range. (Max = %d)"
158#define ERR_TYPE "Type mismatch"
159#define ERR_PARAM "Invalid parameter"
160#define ERR_NO_ARGS "Function takes no arguments"
161#define EVAL_VAR_IS_ARRAY "Expr/RT: Variable is an array"
162#define EVAL_VAR_IS_NOT_ARRAY "Expr/RT: Variable is NOT an array (Use DIM)"
163#define EVAL_NOT_A_NUM "Expr/RT: Not a number"
164#define EVAL_SYNTAX "Expr/RT: Syntax error"
165#define EVAL_TYPE "Expr/RT: Type mismatch"
166#define EVAL_PARAM "Expr/RT: Invalid parameter"
167#define ERR_UNSUPPORTED "Unsupported"
168#define ERR_CONST "LET: Cannot change a constant (CONST always has global scope)"
169#define ERR_NOT_A_VAR "Not a variable"
170#define ERR_RANGE "Out of range"
171#define ERR_MISSING_SEP_OR_PAR "Missing separator OR parenthesis"
172#define ERR_DIVZERO "Division by zero"
173#define ERR_OPERATOR "Operator cannot be used with an array"
174#define ERR_MATSIG "Matrix singular"
175#define ERR_MISSING_LP "Missing '('"
176#define ERR_PARFMT "Parameters count/format error (%s)"
177#define ERR_BYREF "Parameter %d cannot BYREF"
178#define ERR_BAD_FILE_HANDLE "Invalid file number (Use OPEN)"
179#define ERR_SEP_FMT "No separator found (missing %s)"
180#define ERR_POLY "Parsing polyline: type mismatch (element: %d, info: %d)"
181#define ERR_CRITICAL_MISSING_FUNC "Unsupported built-in function call %ld, please report this bug"
182#define ERR_GPF "\n\aOUT OF ADDRESS SPACE\n"
183#define ERR_CRITICAL_MISSING_PROC "Unsupported built-in procedure call %ld, please report this bug"
184#define ERR_RUN_FILE "RUN/EXEC \"%s\" Failed"
185#define ERR_RUNFUNC_FILE "RUN(\"%s\"): Failed"
186#define ERR_PARCOUNT_SP "Parameter count error @%d=%X"
187#define ERR_DATE "Invalid DATE: '%s'. Expected DD/MM/YYYY"
188#define ERR_TIME "Invalid TIME: '%s'. Expected HH:MM:SS"
189#define ERR_BOUND_DIM "U/LBOUND: Array of %d dimensions (%d)"
190#define ERR_BOUND_VAR "U/LBOUND: Variable is not an array"
191#define ERR_FORMAT_INVALID_FORMAT "Wrong format"
192#define ERR_CENTROID "Centroid is undefined"
193#define ERR_WRONG_POLY "Polygon is incorrect"
194#define ERR_POINT "POINT() Invalid parameter"
195#define ERR_LINEEQN_ADIM "MATRIX A, WRONG DIM %dx%d"
196#define ERR_LINEEQN_BDIM "MATRIX B, WRONG DIM %dx%d"
197#define ERR_WRONG_MAT "MATRIX: WRONG DIM %dx%d"
198#define ERR_INPUT_NO_VARS "INPUT without variables"
199#define ERR_ONGOTO_RANGE "ON x %s: Out of range"
200#define ERR_EXITFOR "EXIT FOR: No 'FOR' inside subroutine or function"
201#define ERR_EXITLOOP "EXIT LOOP: No 'LOOP' inside subroutine or function"
202#define ERR_READ_DATA_START "READ: Data out of range. Use RESTORE [label]"
203#define ERR_READ_DATA_INDEX "READ: Data out of range. Use RESTORE [label]"
204#define ERR_READ_DATA_INDEX_FMT "READ: Data out of range (IDX=%d). Use RESTORE [label]"
205#define ERR_PUTENV "ENV failed"
206#define ERR_EXPRSEQ_WITHOUT_EXPR "EXPRSEQ: Missing expression"
207#define ERR_POLY_POINT "Parsing point: type mismatch"
208#define ERR_VP_POS "Viewport out of screen"
209#define ERR_VP_ZERO "Viewport of zero size"
210#define ERR_WIN_ZERO "Window of zero size"
211#define ERR_DRAW_SEP "DRAW: Missing separator (,)"
212#define ERR_DRAW_CMD "DRAW: Command '%c' unsupported"
213#define ERR_FILE_PERM "File IO permission error"
214#define ERR_REF_VAR "BYREF error. Invalid variable reference"
215#define ERR_REF_CIRC_VAR "BYREF error. Circular reference"
216#define ERR_INVALID_CATCH "Invalid catch argument"
217#define ERR_NO_FUNC "Not a function"
218#define ERR_IMAGE_LOAD "Failed to load image: '%s'"
219#define ERR_IMAGE_SAVE "Failed to save image"
220#define ERR_IMAGE_SAVE_ERR "Failed to save image: '%s'"
221#define ERR_FORM_INPUT "Form has no inputs"
222#define ERR_PARAM_NUM "Incorrect number of parameters: %d. Expected %d."
223#define ERR_PACK_TOO_MANY "Too many values to unpack"
224#define ERR_PACK_TOO_FEW "Need more than %d values to unpack"
225#define ERR_MEMORY "Out of memory error"
226#define ERR_NETWORK "Network error"
227#define ERR_XPM_IMAGE "Invalid xpm image"
228#define ERR_FILE_NOT_OPEN "IOError: File not open for reading"
229#define ERR_DIRWALK_NAME "DIRWALK: name %s/%s too long"
230#define ERR_DIRWALK_MISSING_USE "DIRWALK: missing USE statement"
231#define ERR_DIRWALK_CANT_OPEN "DIRWALK: can't open %s"
232#define ERR_LINE_LENGTH "Line length limit exceeded at text: '%s'"
233