Skip to content

Commit cb62e23

Browse files
committed
COMMON: remove obsolete/unimplemented keywords
1 parent 061c0d9 commit cb62e23

File tree

6 files changed

+9
-23
lines changed

6 files changed

+9
-23
lines changed

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
2015-08-02
22
Fix display output before DELAY
3+
Removed obsolete/unimplemented keywords WSPLIT, PLOT2, UNLOADLIB
34

45
2015-07-18
56
Added IDE editor sdl/android

documentation/sbasic_ref.csv

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ Language,function,IFF,638,"IFF expr","Inline version of IF. eg, animal = ""cat""
130130
Language,keyword,BYREF,639,"BYREF","Sub/func argument declaration. Changes to the variable will be passed back to the caller. Equivalent syntax to the @ character."
131131
Language,keyword,CASE,640,"CASE expr","Branch condition for a SELECT statement."
132132
Language,keyword,DEF,641,"DEF name[(par1[,...])] = expression","Defines a single line function. eg, DEF MySin(x) = SIN(x): ? MySin(pi/2)"
133-
Language,keyword,DO,642,"DO","FOR f IN files("*.txt") DO PRINT f"
133+
Language,keyword,DO,642,"DO","FOR f IN files(""*.txt"") DO PRINT f"
134134
Language,keyword,ELIF,643,"ELIF","foo = 2: if foo==1: ? ""one"": ELIF foo==2: ? ""two"": fi"
135135
Language,keyword,ELSE,644,"ELSE","foo = 2: if foo==1: ? ""one"": ELSE: ? ""not one"": fi"
136136
Language,keyword,ELSEIF,645,"ELSEIF","foo = 2: if foo==1: ? ""one"": ELSEIF foo==2: ? ""two"": fi"
@@ -241,9 +241,9 @@ String,command,SINPUT,768,"SINPUT src; var [, delim] [,var [, delim]] ...","Spli
241241
String,command,SPLIT,769,"SPLIT string, delimiters, words() [, pairs] [USE expr]","Returns the words of the specified string into array 'words'."
242242
String,command,SPRINT,770,"SPRINT var; [USING...;] ...","Create formated string and storing it to var. See also: PRINT command."
243243
String,function,ASC,771,"ASC (s)","Returns the ASCII code of first character of the string s."
244-
String,function,BCS,772,"BCS (s)","converts (B)ASIC-style strings to (C)-style (S)trings."
244+
String,function,BCS,772,"BCS (s)","Converts (B)ASIC-style strings to (C)-style (S)trings."
245245
String,function,BIN,773,"BIN (x)","Returns the binary value of x as string."
246-
String,function,CBS,774,"CBS (s)","converts (C)-style strings to (B)ASIC-style (S)trings."
246+
String,function,CBS,774,"CBS (s)","Converts (C)-style strings to (B)ASIC-style (S)trings."
247247
String,function,CHOP,775,"CHOP (source)","Chops off the last character of the string 'source' and returns the result."
248248
String,function,CHR,776,"CHR (x)","Returns one-char string of character with ASCII code x."
249249
String,function,DISCLOSE,777,"DISCLOSE (str[, pairs [, ignore-pairs]])","Discloses a string."
@@ -292,19 +292,16 @@ System,function,TIMER,821,"TIMER","Returns the number of seconds from midnight."
292292
Language,keyword,DECLARE,0,"DECLARE FUNC xxx","Forward declare SUB or FUNC. Obsolete QB compatibility"
293293
Language,keyword,TO,0,"FOR t = 1 TO 10","Specifies the loop counter end in a FOR loop"
294294
Language,keyword,STEP,0,"FOR t = 1 TO 10 STEP 2","Specifies the loop counter increment in a FOR loop"
295-
Language,keyword,USING,0,"",""
296-
Language,keyword,USG,0,"",""
297-
Language,keyword,AS,0,"",""
295+
Language,keyword,USING,0,"PRINT USING","See PRINT, SPRINT"
296+
Language,keyword,USG,0,"PRINT USG","Synonym for USING"
297+
Language,keyword,AS,0,"AS #fileN","See: OPEN"
298298
Language,keyword,TRY,0,"TRY","The TRY statement introduces a TRY/CATCH BLOCK"
299299
Language,keyword,CATCH,0,"CATCH [var | expr]","The CATCH statement is used to CATCH an run-time error. This is typically used with errors raised when calling a file system command that cannot be completed, for example attempting to open a non-existent file. The CATCH statement has two modes. You can supply a variable argument to store the error string. Alternatively you can supply an expression. When the raised error matches the (String) expression, the error will be caught. When using the expression mode, you can supply a succession of CATCH statements to handle various error messages separately."
300300
Language,keyword,END TRY,0,"END TRY","The END TRY statement marks the end of a TRY/CATCH block."
301301
Language,keyword,BG,0,"SOUND frq, dur [, vol] [BG]","Play sound in the background. This prevent the program from blocking while the sound plays."
302302
Language,function,THROW,0,"THROW","The THROW command (previously known as RTE) is used to initiate a catch-able error. If there is no surrounding TRY/CATCH block, THROW can be used to abort the program."
303-
Graphics,command,PLOT2,0,"",""
304-
String,function,WSPLIT,0,"",""
305-
System,command,UNLOADLIB,0,"",""
306303
Graphics,command,SHOWPAGE,0,"SHOWPAGE","This command is used to display pending graphics operations allowing for smooth animations."
307304
Data,function,ISMAP,0,"ISMAP (x)","Returns true if x is an MAP variable type. A MAP provides value-key pair access along with array or dotted notation. The MAP can be initialized from a String variable using the ARRAY command"
308-
Data,function,ISREF,0,"ISREF (x)","Returns true if x is a reference variable type. The REF variable type is a "reference" to another variable (like a pointer in c). You create a reference by assigning a variable with the BYREF keyword (or @ symbol)."
305+
Data,function,ISREF,0,"ISREF (x)","Returns true if x is a reference variable type. The REF variable type is a ""reference"" to another variable (like a pointer in c). You create a reference by assigning a variable with the BYREF keyword (or @ symbol)."
309306
Data,function,ARRAY,0,"ARRAY [var | expr]","Creates a ARRAY or MAP variable from the given string or expression"
310307
Console,command,FORM,0,"FORM","Create a form widget. "

src/common/brun.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -553,9 +553,6 @@ static inline void bc_loop_call_proc() {
553553
case kwRANDOMIZE:
554554
cmd_randomize();
555555
break;
556-
case kwWSPLIT:
557-
cmd_wsplit();
558-
break;
559556
case kwSPLIT:
560557
cmd_split();
561558
break;
@@ -658,9 +655,6 @@ static inline void bc_loop_call_proc() {
658655
case kwCHMOD:
659656
cmd_chmod();
660657
break;
661-
case kwPLOT2:
662-
cmd_plot2();
663-
break;
664658
case kwPLOT:
665659
cmd_plot();
666660
break;

src/common/kw.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,6 @@ enum proc_keywords {
199199
kwCIRCLE,
200200
kwRANDOMIZE,
201201
kwSPLIT,
202-
kwWSPLIT,
203202
kwWJOIN,
204203
kwPAUSE,
205204
kwDELAY,
@@ -233,7 +232,6 @@ enum proc_keywords {
233232
kwRMDIR,
234233
kwFLOCK,
235234
kwCHMOD,
236-
kwPLOT2,
237235
kwPLOT,
238236
kwSTKDUMP,
239237
kwSWAP,
@@ -243,7 +241,6 @@ enum proc_keywords {
243241
kwBSAVE,
244242
kwTIMEHMS,
245243
kwEXPRSEQ,
246-
kwUNLOADLIB,
247244
kwCALLCP,
248245
kwDEFINEKEY,
249246
kwSHOWPAGE,

src/languages/keywords.en.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,6 @@ struct proc_keyword_s proc_table[] = {
375375
{ "CIRCLE", kwCIRCLE },
376376
{ "RANDOMIZE", kwRANDOMIZE },
377377
{ "SPLIT", kwSPLIT },
378-
{ "WSPLIT", kwWSPLIT },
379378
{ "JOIN", kwWJOIN },
380379
{ "PAUSE", kwPAUSE },
381380
{ "DELAY", kwDELAY },
@@ -409,7 +408,6 @@ struct proc_keyword_s proc_table[] = {
409408
{ "TSAVE", kwSAVELN },
410409
{ "LOCK", kwFLOCK },
411410
{ "CHMOD", kwCHMOD },
412-
{ "PLOT2", kwPLOT2 },
413411
{ "PLOT", kwPLOT },
414412
{ "SWAP", kwSWAP },
415413
{ "DIRWALK", kwDIRWALK },
@@ -418,7 +416,6 @@ struct proc_keyword_s proc_table[] = {
418416
{ "BSAVE", kwBSAVE },
419417
{ "TIMEHMS", kwTIMEHMS },
420418
{ "EXPRSEQ", kwEXPRSEQ },
421-
{ "UNLOADLIB", kwUNLOADLIB },
422419
{ "CALL", kwCALLCP },
423420
{ "DEFINEKEY", kwDEFINEKEY },
424421
{ "SHOWPAGE", kwSHOWPAGE },

src/platform/sdl/runtime.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ void Runtime::optionsBox(StringList *items) {
499499
width += (charWidth * OPTIONS_BOX_WIDTH_EXTRA);
500500

501501
int charHeight = _output->getCharHeight();
502-
int textHeight = charHeight + (charHeight / 3);
502+
int textHeight = charHeight + (charHeight / 2);
503503
int height = textHeight * items->size();
504504
if (_menuX + width >= _output->getWidth()) {
505505
_menuX = _output->getWidth() - width;

0 commit comments

Comments
 (0)