-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy patherror_table.cpp
2445 lines (2240 loc) · 103 KB
/
error_table.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#include "error_table.h" // pick up error_table_t definition
// #########################################################################
// ## Wang BASIC Errors ##
// #########################################################################
const std::vector<error_table_t> error_table = {
// -------------------------------------------------------------------------
{
/*err code*/ "01",
/*err msg*/ "Text Overflow",
/*cause*/ "All available space for BASIC statements and system commands has been used.\n"
"Shorten and/or chain program by using COM statements, and continue. The\n"
"compiler automatically removes the current and highest-numbered statement. ",
/*action*/ nullptr,
/*example*/ ":10 FOR I = 1 TO 10\n"
":20 LET X = SIN(I)\n"
":30 NEXT I\n"
" ....\n"
" ....\n"
" ....\n"
":820 IF Z = A-B THEN 900\n"
"^ERR 01\n"
"(the number of characters in the program exceeded\n"
"the available space in memory for program text\n"
"when line 820 was entered). User must shorten or\n"
"segment program.",
/*correction*/ nullptr,
},
// -------------------------------------------------------------------------
{
/*err code*/ "02",
/*err msg*/ "Table Overflow",
/*cause*/ "All available space for the program, internal tables and variables has been\n"
"filled (see \"Internal Storage,\" Section I). When ERR02 occurs, all non-common\n"
"variables are cleared.",
/*action*/ "Examine program for:\n"
"1) excessive DIM, COM statements.\n"
"2) subroutines not terminated by RETURN or RETURN CLEAR,\n"
" improper exits from FOR/NEXT loops.\n"
"Suggestion: Insert an END statement as the first line in the program and\n"
"execute the routine. If END = value appears, the error is probably case 2);\n"
"otherwise, case 1). ",
/*example*/ ":10 DIM A(19), B(10,10), C(10,10)\n"
"RUN\n"
"^ERR 02\n"
"(the space available for variable tables was\n"
"exceeded) user must reduce program and variable\n"
"storage requirements or change program logic.",
/*correction*/ nullptr,
},
// -------------------------------------------------------------------------
{
/*err code*/ "03",
/*err msg*/ "Math Error",
/*cause*/ "1. EXPONENT OVERFLOW. The exponent of the calculated value was < -99 or > 99.\n"
" (+, - *, /, ^, TAN, EXP).\n"
"2. DIVISION BY ZERO.\n"
"3. NEGATIVE OR ZERO LOG FUNCTION ARGUMENT.\n"
"4. NEGATIVE SQR FUNCTION ARGUMENT.\n"
"5. INVALID EXPONENTIATION. An exponentiation, (X^Y) was attempted where\n"
" X was negative and Y was not an integer, producing an imaginary result,\n"
" or X and Y were both zero.\n"
"6. ILLEGAL SIN, COS, OR TAN ARGUMENT. The function argument exceeds\n"
" 2*pi x 10^11 radians.",
/*action*/ "Correct the program or program data.",
/*example*/ "PRINT (2E+64) / (2E-41)\n"
" ^ERR 03\n"
"(exponent overflow)",
/*correction*/ nullptr,
},
// -------------------------------------------------------------------------
{
/*err code*/ "04",
/*err msg*/ "Missing Left Parenthesis",
/*cause*/ "A left parenthesis ( ( ) was expected.",
/*action*/ "Correct statement text.",
/*example*/ ":10 DEF FNA V) = SIN(3*V-1)\n"
" ^ERR 04",
/*correction*/ ":10 DEF FNA(V) = SIN(3*V-1)",
},
// -------------------------------------------------------------------------
{
/*err code*/ "05",
/*err msg*/ "Missing Right Parenthesis",
/*cause*/ "A right ( ) ) parenthesis was expected.",
/*action*/ "Correct statement text.",
/*example*/ ":10 Y = INT(1.2^5\n"
" ^ERR 05",
/*correction*/ ":10 Y = INT(1.2^5)",
},
// -------------------------------------------------------------------------
{
/*err code*/ "06",
/*err msg*/ "Missing Equals Sign",
/*cause*/ "An equals sign (=) was expected.",
/*action*/ "Correct statement text.",
/*example*/ ":10 DEFFNC(V) - V + 2\n"
" ^ERR 06",
/*correction*/ ":10 DEFFNC(V) = V+2",
},
// -------------------------------------------------------------------------
{
/*err code*/ "07",
/*err msg*/ "Missing Quotation Marks",
/*cause*/ "Quotation marks were expected.",
/*action*/ "Reenter the DATASAVE OPEN statement correctly.",
/*example*/ ":DATASAVE OPEN TTTT\"\n"
" ^ERR 07",
/*correction*/ ":DATASAVE OPEN \"TTTT\"",
},
// -------------------------------------------------------------------------
{
/*err code*/ "08",
/*err msg*/ "Undefined FN Function",
/*cause*/ "An undefined FN function was referenced.",
/*action*/ "Correct program to define or reference the function correctly.",
/*example*/ ":10 X=FNC(2)\n"
":20 PRINT \"X\";X\n"
":30 END\n"
":RUN\n"
"10 X=FNC(2)\n"
" ^ERR 08",
/*correction*/ ":05 DEFFNC(V)=COS(2*V)",
},
// -------------------------------------------------------------------------
{
/*err code*/ "09",
/*err msg*/ "Illegal FN Usage",
/*cause*/ "More than five levels of nesting were encountered when evaluating an FN\n"
"function.",
/*action*/ "Reduce the number of nested functions.",
/*example*/ ":10 DEF FN1(X)=1+X :DEF FN2(X)=1+FN1(X)\n"
":20 DEF FN3(X)=1+FN2(X) :DEF FN4(X)=1+FN3(X)\n"
":30 DEF FN5(X)=1+FN4(X) :DEF FN6(X)=1+FN5(X)\n"
":40 PRINT FN6(2)\n"
":RUN\n"
"10 DEF FN1(X)=1+X :DEF FN2(X)=1+FN1(X)\n"
" ^ERR 09",
/*correction*/ ":40 PRINT 1+FN5(2)",
},
// -------------------------------------------------------------------------
{
/*err code*/ "10",
/*err msg*/ "Incomplete Statement",
/*cause*/ "The end of the statement was expected.",
/*action*/ "Complete the statement text.",
/*example*/ ":10 PRINT X\"\n"
" ^ERR 10",
/*correction*/ ":10 PRINT \"X\"\n"
" OR\n"
":10 PRINT X",
},
// -------------------------------------------------------------------------
{
/*err code*/ "11",
/*err msg*/ "Missing Line Number or Continue Illegal",
/*cause*/ "The line number is missing or a referenced line number is undefined; or the\n"
"user is attempting to continue program execution after one of the following\n"
"conditions: A text or table overflow error, a new variable has been entered, a\n"
"CLEAR command has been entered, the user program text has been modified, or the\n"
"RESET key has been pressed. ",
/*action*/ "Correct statement text.",
/*example*/ ":10 GOSUB 200\n"
" ^ERR 11",
/*correction*/ ":10 GOSUB 100",
},
// -------------------------------------------------------------------------
{
/*err code*/ "12",
/*err msg*/ "Missing Statement Text",
/*cause*/ "The required statement text is missing (THEN, STEP, etc.).",
/*action*/ "Correct statement text.",
/*example*/ ":10 IF I=12*X,45\n"
" ^ERR 12",
/*correction*/ ":10 IF I=12*X THEN 45",
},
// -------------------------------------------------------------------------
{
/*err code*/ "13",
/*err msg*/ "Missing or Illegal Integer",
/*cause*/ "A positive integer was expected or an integer was found which exceeded the\n"
"allowed limit.",
/*action*/ "Correct statement text.",
/*example*/ ":10 COM D(P)\n"
" ^ERR 13 ",
/*correction*/ ":10 COM D(8)",
},
// -------------------------------------------------------------------------
{
/*err code*/ "14",
/*err msg*/ "Missing Relation Operator",
/*cause*/ "A relational operator ( <, =, >, <=, >=, <> ) was expected.",
/*action*/ "Correct statement text.",
/*example*/ ":10 IF A-B THEN 100\n"
" ^ERR 14",
/*correction*/ ":10 IF A=B THEN 100 ",
},
// -------------------------------------------------------------------------
{
/*err code*/ "15",
/*err msg*/ "Missing Expression",
/*cause*/ "A variable, or number, or a function was expected.",
/*action*/ "Correct statement text.",
/*example*/ ":10 FOR I=, TO 2\n"
" ^ERR 15",
/*correction*/ ":10 FOR I=1 TO 2",
},
// -------------------------------------------------------------------------
{
/*err code*/ "16",
/*err msg*/ "Missing Scalar Variable",
/*cause*/ "A scalar variable was expected.",
/*action*/ "Correct statement text.",
/*example*/ ":10 FOR A(3)=1 TO 2\n"
" ^ERR 16 ",
/*correction*/ ":10 FOR B=I TO 2",
},
// -------------------------------------------------------------------------
{
/*err code*/ "17",
/*err msg*/ "Missing Array Element or Array",
/*cause*/ "An array variable was expected.",
/*action*/ "Correct statement text.",
/*example*/ ":10 DIM A2\n"
" ^ERR 17",
/*correction*/ ":10 DIM A(2)",
},
// -------------------------------------------------------------------------
{
/*err code*/ "18",
/*err msg*/ "Illegal Value for Array Dimension",
/*cause*/ "The value exceeds the allowable limit. For example, a dimension is greater than\n"
"255 or an array variable subscript exceeds the defined dimension, or an array\n"
"contains more than 4,096 elements.",
/*action*/ "Correct the program.",
/*example*/ ":10 DIM A(2,3)\n"
":20 A(1,4) = 1\n"
":RUN\n"
"20 A(1,4) = 1\n"
" ^ERR 18",
/*correction*/ ":10 DIM A(2,4)",
},
// -------------------------------------------------------------------------
{
/*err code*/ "19",
/*err msg*/ "Missing Number",
/*cause*/ "A number was expected.",
/*action*/ "Correct statement text.",
/*example*/ ":10 DATA +\n"
" ^ERR 19",
/*correction*/ ":10 DATA +1",
},
// -------------------------------------------------------------------------
{
/*err code*/ "20",
/*err msg*/ "Illegal Number Format",
/*cause*/ "The form of a number is illegal.",
/*action*/ "Correct statement text.",
/*example*/ ":10 A=12345678.234567\n"
" ^ERR 20\n"
"(More than 13 digits of mantissa) ",
/*correction*/ ":10 A=12345678.23456",
},
// -------------------------------------------------------------------------
{
/*err code*/ "21",
/*err msg*/ "Missing Letter or Digit",
/*cause*/ "A letter or digit was expected.",
/*action*/ "Correct statement text.",
/*example*/ ":10 DEF FN.(X)=X^5-1\n"
" ^ERR 21",
/*correction*/ ":10 DEF FN1(X)=X^5-1",
},
// -------------------------------------------------------------------------
{
/*err code*/ "22",
/*err msg*/ "Undefined Array Variable or Array Element",
/*cause*/ "An array variable which was not defined properly in a DIM or COM statement is\n"
"referenced in the program. (An array variable was either not defined in a DIM\n"
"or COM statement or has been referenced as both a one-dimensional and a\n"
"two-dimensional array, or has been changed during execution (CLEAR V to correct\n"
"the latter).) ",
/*action*/ "Correct statement text.",
/*example*/ ":10 A(2,2) = 123\n"
":RUN\n"
"10 A(2,2) = 123\n"
" ^ERR 22",
/*correction*/ ":1 DIM A(4,4)",
},
// -------------------------------------------------------------------------
{
/*err code*/ "23",
/*err msg*/ "No Program Statements",
/*cause*/ "A RUN command was entered but there are no program statements.",
/*action*/ "Enter program statements.",
/*example*/ ":RUN\n"
"^ERR 23",
/*correction*/ nullptr,
},
// -------------------------------------------------------------------------
{
/*err code*/ "24",
/*err msg*/ "Illegal Immediate Mode Statement",
/*cause*/ "An illegal verb or transfer in an Immediate Mode statement was encountered.",
/*action*/ "Re-enter a corrected Immediate Mode statement.",
/*example*/ "IF A = I THEN 100\n"
" ^ERR 24",
/*correction*/ nullptr,
},
// -------------------------------------------------------------------------
{
/*err code*/ "25",
/*err msg*/ "Illegal GOSUB/RETURN Usage",
/*cause*/ "There is no companion GOSUB statement for a RETURN statement, or a branch was\n"
"made into the middle of a subroutine.",
/*action*/ "Correct the program.",
/*example*/ ":10 FOR I=1 TO 20\n"
":20 X=I*SIN(I*4)\n"
":25 GOTO 100\n"
":30 NEXT I: END\n"
":100 PRINT \"X=\";X\n"
":110 RETURN\n"
":RUN\n"
"X=-.7568025\n"
"110 RETURN\n"
" ^ERR 25",
/*correction*/ ":25 GOSUB 100",
},
// -------------------------------------------------------------------------
{
/*err code*/ "26",
/*err msg*/ "Illegal FOR/NEXT Usage",
/*cause*/ "There is no companion FOR statement for a NEXT statement, or a branch was made\n"
"into the middle of a FOR/NEXT loop.",
/*action*/ "Correct the program.",
/*example*/ ":10 PRINT \"1=\";I\n"
":20 NEXT I\n"
":30 END\n"
":RUN\n"
"I=0\n"
"20 NEXT I\n"
" ^ERR 26",
/*correction*/ ":5 FOR I=1 TO 10",
},
// -------------------------------------------------------------------------
{
/*err code*/ "27",
/*err msg*/ "Insufficient Data",
/*cause*/ "There are not enough data values to satisfy READ statement requirements.",
/*action*/ "Correct program to supply additional data.",
/*example*/ ":10 DATA 2\n"
":20 READ X,Y\n"
":30 END\n"
":RUN\n"
"20 READ X,Y\n"
" ^ERR 27",
/*correction*/ ":11 DATA 3",
},
// -------------------------------------------------------------------------
{
/*err code*/ "28",
/*err msg*/ "Data Reference Beyond Limits",
/*cause*/ "The data reference in a RESTORE statement is beyond the existing data limits.",
/*action*/ "Correct the RESTORE statement.",
/*example*/ ":10 DATA 1,2,3\n"
":20 READ X,Y,Z\n"
":30 RESTORE 5\n"
":90 END\n"
":RUN\n"
"30 RESTORE 5\n"
" ^ERR 28",
/*correction*/ ":30 RESTORE 2",
},
// -------------------------------------------------------------------------
{
/*err code*/ "29",
/*err msg*/ "Illegal Data Format ",
/*cause*/ "The value entered as requested by an INPUT statement is in an illegal format.",
/*action*/ "Reenter data in the correct format starting with erroneous number or terminate\n"
"run with the RESET key and run again.",
/*example*/ ":10 INPUT X,Y\n"
":90 END\n"
":RUN\n"
":INPUT\n"
"?1A,2E-30\n"
" ^ERR 29",
/*correction*/ "?12,2E-30",
},
// -------------------------------------------------------------------------
{
/*err code*/ "30",
/*err msg*/ "Illegal Common Assignment",
/*cause*/ "A COM statement was preceded by a non-common variable definition.",
/*action*/ "Correct program, making all COM statements the first numbered lines.",
/*example*/ ":10 A=1 :B=2\n"
":20 COM A,B\n"
":99 END\n"
":RUN\n"
"20 COM A,B\n"
" ^ERR 30",
/*correction*/ ":10[CR/LF-EXECUTE]\n"
":30 A=1:B=2",
},
// -------------------------------------------------------------------------
{
/*err code*/ "31",
/*err msg*/ "Illegal Line Number",
/*cause*/ "The 'statement number' key was pressed producing a'line number greater than\n"
"9999; or in renumbering a program with the RENUMBER command a line number was\n"
"generated which was greater than 9999.",
/*action*/ "Correct the program.",
/*example*/ ":9995 PRINT X,Y\n"
":[STMT NUMBER Key]\n"
"^ERR 31",
/*correction*/ nullptr,
},
// -------------------------------------------------------------------------
{
/*err code*/ "33",
/*err msg*/ "Missing HEX Digit",
/*cause*/ "A digit or a letter from A to F was expected.",
/*action*/ "Correct the program text.",
/*example*/ ":10 SELECT PRINT 00P\n"
" ^ERR 33",
/*correction*/ ":10 SELECT PRINT 005",
},
// -------------------------------------------------------------------------
{
/*err code*/ "34",
/*err msg*/ "Tape Read Error",
/*cause*/ "The system was unable to read the next record on the tape; the tape is\n"
"positioned after the bad record after attempting to read the bad record ten\n"
"times.",
/*action*/ nullptr,
/*example*/ nullptr,
/*correction*/ nullptr,
},
// -------------------------------------------------------------------------
{
/*err code*/ "35",
/*err msg*/ "Missing Comma or Semicolon",
/*cause*/ "A comma or semicolon was expected.",
/*action*/ "Correct statement text.",
/*example*/ ":10 DATASAVE #2 X,Y,Z\n"
" ^ERR 35",
/*correction*/ ":10 DATASAVE #2,X,Y,Z",
},
// -------------------------------------------------------------------------
{
/*err code*/ "36",
/*err msg*/ "Illegal Image Statement",
/*cause*/ "No format (e.g. #.##) in image statement.",
/*action*/ "Correct the Image Statement.",
/*example*/ ":10 PRINTUSING 20, 1.23\n"
":20% AMOUNT =\n"
":RUN\n"
":10 PRINTUSING 20,1.23\n"
" ^ERR 36",
/*correction*/ ":20% AMOUNT = #####",
},
// -------------------------------------------------------------------------
{
/*err code*/ "37",
/*err msg*/ "Statement Not an Image Statement",
/*cause*/ "The statement referenced by the PRINTUSING statement is not an Image statement.",
/*action*/ "Correct either the PRINTUSING or the Image statement.",
/*example*/ ":10 PRINTUSING 20,X\n"
":20 PRINT X\n"
":RUN\n"
":10 PRINTUSING 20,X\n"
" ^ERR 37",
/*correction*/ ":20% AMOUNT = $#,###.##",
},
// -------------------------------------------------------------------------
{
/*err code*/ "38",
/*err msg*/ "Illegal Floating Point Format",
/*cause*/ "Fewer than 4 up arrows were specified in the floating point format in an image\n"
"statement.",
/*action*/ "Correct the Image statement.",
/*example*/ ":10 % ##.##^^^\n"
" ^ERR 38",
/*correction*/ ":10 % ##.##^^^^",
},
// -------------------------------------------------------------------------
{
/*err code*/ "39",
/*err msg*/ "Missing Literal String",
/*cause*/ "A literal string was expected.",
/*action*/ "Correct the text.",
/*example*/ ":10 READ A5\n"
":20 DATA 123\n"
":RUN\n"
"20 DATA 123\n"
" ^ERR 39",
/*correction*/ "20 DATA \"123\"",
},
// -------------------------------------------------------------------------
{
/*err code*/ "40",
/*err msg*/ "Missing Alphanumeric Variable",
/*cause*/ "An alphanumeric variable was expected.",
/*action*/ "Correct the statement text.",
/*example*/ ":10 A$, X = \"JOHN\"\n"
" ^ERR 40",
/*correction*/ ":10 A$, X$ = \"JOHN\"",
},
// -------------------------------------------------------------------------
{
/*err code*/ "41",
/*err msg*/ "Illegal STR( Arguments",
/*cause*/ "The STR( function arguments exceed the maximum length of the alpha variable.",
/*action*/ nullptr,
/*example*/ ":10 B$ = STR(A$, 10, 8)\n"
" ^ERR 41",
/*correction*/ ":10 B$ = STR(A$, 10, 6)",
},
// -------------------------------------------------------------------------
{
/*err code*/ "42",
/*err msg*/ "File Name Too Long",
/*cause*/ "The program name specified is too long (a maximum of 8 characters is allowed).",
/*action*/ "Correct the program text.",
/*example*/ ":SAVE \"PROGRAM#1\"\n"
" ^ERR 42",
/*correction*/ ":SAVE \"PROGRAM1\"",
},
// -------------------------------------------------------------------------
{
/*err code*/ "43",
/*err msg*/ "Wrong Variable Type",
/*cause*/ "During a DATALOAD operation a numeric (or alphanumeric) value was expected but\n"
"an alphanumeric (or numeric) value was read.",
/*action*/ "Correct the program or make sure proper tape is mounted.",
/*example*/ ":DATALOAD X, Y\n"
" ^ERR 43",
/*correction*/ ":DATALOAD X$, Y$",
},
// -------------------------------------------------------------------------
{
/*err code*/ "44",
/*err msg*/ "Program Protected",
/*cause*/ "A program loaded was protected and, hence, cannot be SAVED or LISTED.",
/*action*/ "Execute a CLEAR command to remove protect mode; any program in memory is\n"
"cleared.",
/*example*/ nullptr,
/*correction*/ nullptr,
},
// -------------------------------------------------------------------------
{
/*err code*/ "45",
/*err msg*/ "Program Line Too Long",
/*cause*/ "A statement line may not exceed 192 keystrokes.",
/*action*/ "Shorten the line being entered.",
/*example*/ nullptr,
/*correction*/ nullptr,
},
// -------------------------------------------------------------------------
{
/*err code*/ "46",
/*err msg*/ "New Starting Statement Number Too Low",
/*cause*/ "The new starting statement number in a RENUMBER command is not greater than the\n"
"next lowest statement number.",
/*action*/ "Reenter the RENUMBER command correctly.",
/*example*/ "50 REM - PROGRAM 1\n"
"62 PRINT X, Y\n"
"73 GOSUB 500\n"
":\n"
":RENUMBER 62, 20, 5\n"
" ^ERR 46",
/*correction*/ ":RENUMBER 62, 60, 5",
},
// -------------------------------------------------------------------------
{
/*err code*/ "47",
/*err msg*/ "Illegal Or Undefined Device Specification",
/*cause*/ "The #f file specification in a program statement is undefined.",
/*action*/ "Define the specified file number with a SELECT statement.",
/*example*/ ":SAVE #2\n"
" ^ERR 47",
/*correction*/ ":SELECT #2 10A\n"
":SAVE #2",
},
// -------------------------------------------------------------------------
{
/*err code*/ "48",
/*err msg*/ "Undefined Keyboard Function",
/*cause*/ "There is no DEFFN' in a user's program corresponding to the Special Function\n"
"key pressed.",
/*action*/ "Correct the program.",
/*example*/ ": [Special Function Key #2]\n"
"^ERR 48",
/*correction*/ nullptr,
},
// -------------------------------------------------------------------------
{
/*err code*/ "49",
/*err msg*/ "End of Tape",
/*cause*/ "The end of tape was encountered during a tape operation.",
/*action*/ "Correct the program, make sure the tape is correctly positioned or, if loading\n"
"a program or datafile by name, be sure you have mounted the correct tape.",
/*example*/ "100 DATALOAD X, Y, Z\n"
" ^ERR 49",
/*correction*/ nullptr,
},
// -------------------------------------------------------------------------
{
/*err code*/ "50",
/*err msg*/ "Protected Tape",
/*cause*/ "A tape operation is attempting to write on a tape cassette that has been\n"
"protected (by opening tab on bottom of cassette).",
/*action*/ "Mount another cassette or \"unprotect\" the tape cassette by covering the hole on\n"
"the bottom of the cassette with the tab or tape.",
/*example*/ "SAVE/103\n"
" ^ERR 50 ",
/*correction*/ nullptr,
},
// -------------------------------------------------------------------------
{
/*err code*/ "51",
/*err msg*/ "Illegal Statement",
/*cause*/ "The statement input is not a legal BASIC statement.",
/*action*/ "Do not use this statement.",
/*example*/ nullptr,
/*correction*/ nullptr,
},
// -------------------------------------------------------------------------
{
/*err code*/ "52",
/*err msg*/ "Expected Data (Nonheader) Record",
/*cause*/ "A DATALOAD operation was attempted but the device was not positioned at a data\n"
"record.",
/*action*/ "Make sure the correct device is positioned correctly.",
/*example*/ nullptr,
/*correction*/ nullptr,
},
// -------------------------------------------------------------------------
{
/*err code*/ "53",
/*err msg*/ "Illegal Use of HEX Function",
/*cause*/ "The HEX( function is being used incorrectly. The HEX function may not be used\n"
"in a PRINTUSING statement. ",
/*action*/ "Do not use HEX function in this situation.",
/*example*/ ":10 PRINTUSING 200, HEX(F4F5)\n"
" ^ERR 53",
/*correction*/ ":10 A$ = HEX(F4F5)\n"
":20 PRINTUSING 200,A$",
},
// -------------------------------------------------------------------------
{
/*err code*/ "54",
/*err msg*/ "Illegal Plot Argument",
/*cause*/ "An argument in the PLOT statement is illegal.",
/*action*/ "Correct the PLOT statement.",
/*example*/ "100 PLOT <5,,H>\n"
" ^ERR 54",
/*correction*/ "100 PLOT <5,,C>",
},
// -------------------------------------------------------------------------
{
/*err code*/ "55",
/*err msg*/ "Illegal BT Argument",
/*cause*/ "An argument in a DATALOAD BT or DATASAVE BT statement is illegal.",
/*action*/ "Correct the statement in error.",
/*example*/ "100 DATALOAD BT (M=50) A$\n"
" ^ERR 55",
/*correction*/ "100 DATALOAD BT (N=50) A$",
},
// -------------------------------------------------------------------------
{
/*err code*/ "56",
/*err msg*/ "Number Exceeds Image Format",
/*cause*/ "The value of the number being packed or converted is greater than the number of\n"
"integer digits provided for in the PACK or CONVERT Image.",
/*action*/ "Change the Image specification.",
/*example*/ "100 PACK (##) A$ FROM 1234\n"
" ^ERR 56",
/*correction*/ "100 PACK (####) A$ FROM 1234",
},
// -------------------------------------------------------------------------
{
/*err code*/ "57",
/*err msg*/ "Value Not Between 0 and 32767",
/*cause*/ "Illegal value specified; value is negative or greater than 32767. (The System\n"
"2200 cannot store a sector address greater than 32767 and cannot handle certain\n"
"MAT arrays with addresses outside this range.) ",
/*action*/ "Correct the program statement in error.",
/*example*/ "100 DATASAVE DAF (42000,X) A,B,C\n"
" ^ERR 57",
/*correction*/ "100 DATASAVE DAF (4200,X) A,B,C",
},
// -------------------------------------------------------------------------
{
/*err code*/ "58",
/*err msg*/ "Expected Data Record",
/*cause*/ "A program record or header record was read when a data record was expected.",
/*action*/ "Correct the program.",
/*example*/ "100 DATALOAD DAF(0,X) A,B,C\n"
" ^ERR 58",
/*correction*/ nullptr,
},
// -------------------------------------------------------------------------
{
/*err code*/ "59",
/*err msg*/ "Illegal Alpha Variable For Sector Address",
/*cause*/ "Alphanumeric receiver for the next available address in the disk DA instruction\n"
"is not at least 2 bytes long or MAT locator array too small.",
/*action*/ "Dimension the alpha variable to be at least two bytes (characters) long.",
/*example*/ "10 DIM A$1\n"
"100 DATASAVE DAR( 1, A$ ) X,Y,Z\n"
" ^ERR 59",
/*correction*/ "10 DIM A$2",
},
// -------------------------------------------------------------------------
{
/*err code*/ "60",
/*err msg*/ "Array Too Small",
/*cause*/ "The alphanumeric array does not contain enough space to store the block of\n"
"information being read from disk or tape or being packed into it. For cassette\n"
"tape and disk records, the array must contain at least 256 bytes (100 bytes for\n"
"100 byte cassette blocks). ",
/*action*/ "Increase the size of the array.",
/*example*/ "10 DIM A$(15)\n"
"20 DATALOAD BT A$()\n"
" ^ERR 60",
/*correction*/ "10 DIM A$(16)",
},
// -------------------------------------------------------------------------
{
/*err code*/ "61",
/*err msg*/ "Transient Disk Hardware Error",
/*cause*/ "The disk did not recognize or properly respond back to the System 2200 during\n"
"read or write operation in the proper amount of time.",
/*action*/ "Run program again. If error persists, re-initialize the disk; if error still\n"
"persists contact Wang service personnel. ",
/*example*/ "100 DATASAVE DCF X,Y,Z\n"
" ^ERR 61",
/*correction*/ nullptr,
},
// -------------------------------------------------------------------------
{
/*err code*/ "62",
/*err msg*/ "File Full",
/*cause*/ "The disk sector being addressed is not located within the catalogued specified\n"
"file. When writing, the file is full; for other operations, a SKIP or BACKSPACE\n"
"has set the sector address beyond the limits of the file.",
/*action*/ "Correct the program.",
/*example*/ "100 DATASAVE DCT#2, A$(), B$(), C$( )\n"
" ^ERR 62",
/*correction*/ nullptr,
},
// -------------------------------------------------------------------------
{
/*err code*/ "63",
/*err msg*/ "Missing Alpha Array Designator",
/*cause*/ "An alpha array designator (e.g., A$( ) ) was expected. (Block operations for\n"
"cassette and disk require an alpha array argument.)",
/*action*/ "Correct the statement in error.",
/*example*/ "100 DATALOAD BT A$\n"
" ^ERR 63",
/*correction*/ "100 DATALOAD BT A$()",
},
// -------------------------------------------------------------------------
{
/*err code*/ "64",
/*err msg*/ "Sector Not On Disk or Disk Not Scratched",
/*cause*/ "The disk sector being addressed is not on the disk. (Maximum legal sector\n"
"address depends upon the model of disk used.)",
/*action*/ "Correct the program statement in error.",
/*example*/ "100 MOVEEND F = 10000\n"
" ^ERR 64",
/*correction*/ "100 MOVEEND F = 9791",
},
// -------------------------------------------------------------------------
{
/*err code*/ "65",
/*err msg*/ "Disk Hardware Malfunction",
/*cause*/ "A disk hardware error occurred: i.e., the disk is not in file-ready position.\n"
"This could occur, for example, if the disk is in LOAD mode or power is not\n"
"turned on.",
/*action*/ "Insure disk is turned on and properly setup for operation. Set the disk into\n"
"LOAD mode and then back into RUN mode, with the RUN/LOAD selection switch. The\n"
"check light should then go out. If error persists call your Wang Service\n"
"personnel. (Note, the disk must never be left in LOAD mode when running.) ",
/*example*/ "100 DATALOAD DCF A$,B$\n"
" ^ERR 65",
/*correction*/ nullptr,
},
// -------------------------------------------------------------------------
{
/*err code*/ "66",
/*err msg*/ "Format Key Engaged",
/*cause*/ "The disk format key is engaged. (The key should be engaged only when formatting\n"
"a disk.)",
/*action*/ "Turn off the format key.",
/*example*/ "100 DATASAVE DCF X,Y,Z\n"
" ^ERR 66",
/*correction*/ nullptr,
},
// -------------------------------------------------------------------------
{
/*err code*/ "67",
/*err msg*/ "Disk Format Error",
/*cause*/ "A disk format error was detected on disk read or write. The disk is not\n"
"properly formatted. The error can be either in the medium or the hardware.",
/*action*/ "Format the disk again; if error persists, call for Wang service.",
/*example*/ "100 DATALOAD DCF X,Y,Z\n"
" ^ERR 67",
/*correction*/ nullptr,
},
// -------------------------------------------------------------------------
{
/*err code*/ "68",
/*err msg*/ "LRC Error",
/*cause*/ "A disk longitudinal redundancy check error occurred when reading a sector. The\n"
"data may have been written incorrectly, or the System 2200/Disk Controller\n"
"could be malfunctioning.",
/*action*/ "Run program again. If error persists, re-write the bad sector. If error still\n"
"persists, call Wang Service personnel.",
/*example*/ "100 DATALOAD DCF A$( )\n"
" ^ERR 68",
/*correction*/ nullptr,
},
// -------------------------------------------------------------------------
{
/*err code*/ "71",
/*err msg*/ "Cannot Find Sector",
/*cause*/ "A disk-seek error occurred; the specified sector could not be found on the\n"
"disk.",
/*action*/ "Run program again. If error persists, re-initialize (reformat) the disk. If\n"
"error still occurs call Wang Service personnel.",
/*example*/ "100 DATALOAD DCF A$( )\n"
" ^ERR 71",
/*correction*/ nullptr,
},
// -------------------------------------------------------------------------
{
/*err code*/ "72",
/*err msg*/ "Cyclic Read Error",
/*cause*/ "A cyclic redundancy check disk read error occurred; the sector being addressed\n"
"has never been written to or was incorrectly written. This usually means the\n"
"disk was never initially formatted.",
/*action*/ "Format the disk. If the disk was formatted, re-write the bad sector, or\n"
"reformat the disk. If error persists call Wang Service personnel.",
/*example*/ "100 MOVEEND F = 8000\n"
" ^ERR 72",
/*correction*/ nullptr,
},
// -------------------------------------------------------------------------
{
/*err code*/ "73",
/*err msg*/ "Illegal Altering Of A File",
/*cause*/ "The user is attempting to rename or write over an existing scratched file, but\n"
"is not using the proper syntax. The scratched file name must be referenced.",
/*action*/ "Use the proper form of the statement.",
/*example*/ "SAVE DC F \"SAM 1\"\n"
" ^ERR 73",
/*correction*/ R"(SAVE DCF ("SAM1") "SAM1")",
},
// -------------------------------------------------------------------------
{
/*err code*/ "74",
/*err msg*/ "Catalog End Error",
/*cause*/ "The end of catalog area falls within the library index area or has been changed\n"
"by MOVEEND to fall within the area already used by the catalog; or there is no\n"
"room left in the catalog area to store more information.",
/*action*/ nullptr,
/*example*/ "SCRATCH DISK F LS=100, END=50\n"
" ^ERR 74",
/*correction*/ "SCRATCH DISK F LS=100, END=500",
},
// -------------------------------------------------------------------------
{
/*err code*/ "75",
/*err msg*/ "Command Only (Not Programmable)",
/*cause*/ "A command is being used within a BASIC program; Commands are not programmable.",
/*action*/ "Do not use commands as program statements.",
/*example*/ "10 LIST\n"
" ^ERR 75",
/*correction*/ nullptr,
},
// -------------------------------------------------------------------------
{
/*err code*/ "76",
/*err msg*/ "Missing < or > (in PLOT statement)",
/*cause*/ "The required PLOT angle brackets are not in the PLOT statement.",
/*action*/ "Correct the statement in error.",
/*example*/ "100 PLOT A, B, \"*\"\n"
" ^ERR 76",
/*correction*/ "100 PLOT <A, B, \"*\">",
},
// -------------------------------------------------------------------------
{
/*err code*/ "77",
/*err msg*/ "Starting Sector Greater Than Ending Sector",
/*cause*/ "The starting sector address specified is greater than the ending sector address\n"
"specified.",
/*action*/ "Correct the statement in error.",
/*example*/ "10 COPY FR(1000, 100)\n"
" ^ERR 77",
/*correction*/ "10 COPY FR(100, 1000)",
},
// -------------------------------------------------------------------------
{
/*err code*/ "78",
/*err msg*/ "File Not Scratched",
/*cause*/ "A file is being renamed that has not been scratched.",
/*action*/ "Scratch the file before renaming it.",
/*example*/ "SAVE DCF (\"LINREG\") \"LINREG2\"\n"
" ^ERR 78",
/*correction*/ "SCRATCH F \"LINREG\"\n"
"SAVE DCF (\"LINREG\") \"LINREG2\"",
},
// -------------------------------------------------------------------------
{
/*err code*/ "79",
/*err msg*/ "File Already Catalogued",
/*cause*/ "An attempt was made to catalogue a file with a name that already exists in the\n"
"catalogue index.",
/*action*/ "Use a different name.",
/*example*/ "SAVE DCF \"MATLIB\"\n"
" ^ERR 79",