Skip to content

Commit 061c0d9

Browse files
committed
DOC: update documentation
1 parent b3a20de commit 061c0d9

File tree

2 files changed

+32
-7
lines changed

2 files changed

+32
-7
lines changed

documentation/build_kwp.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,19 @@ bool isKeyword(const char *keyword) {
8080
result = true;
8181
}
8282
}
83+
84+
for (int i = 0; !result && opr_table[i].name[0] != '\0'; i++) {
85+
if (strcasecmp(opr_table[i].name, keyword) == 0) {
86+
result = true;
87+
}
88+
}
89+
90+
for (int i = 0; !result && spopr_table[i].name[0] != '\0'; i++) {
91+
if (strcasecmp(spopr_table[i].name, keyword) == 0) {
92+
result = true;
93+
}
94+
}
95+
8396
return result;
8497
}
8598

documentation/sbasic_ref.csv

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ Math,function,DETERM,729,"DETERM (A[, toler])","Determinant of A. toler = tolera
2020
Math,function,ASECH,714,"ASECH (x)","Inverse secant."
2121
Console,command,AT,521,"AT x, y","Moves the console cursor to the specified position. x,y are in pixels."
2222
Console,command,BEEP,522,"BEEP","Generates a beep sound."
23-
Console,command,BUTTON,523,"BUTTON x, y, w, h, variable, caption [,type]","Creates a button widget for display on a FORM. Possible types are radio, checkbox, button, label, listbox and dropdown. The variable is for data transfer to set or retrieve the button state. Set w+h to a negative value to use the caption width plus the absolute amount. Pass a negtive x+y value to offset from the previous widget. listbox and dropdown can be initialised using an array variable or by passing a vertical bar (|) character separated list of values in varible or caption."
2423
Console,command,CLS,524,"CLS ","Clears the screen."
25-
Console,command,DOFORM,525,"DOFORM FLAG|VAR","Runs the form created with the BUTTON and TEXT commands. Must be called from within a loop to keep the form active. Pass a control variable to receive the value of the selected or clicked form control. Pass 0 to close the form."
26-
Console,command,HTML,526,"HTML, [title,] [x,y,w,h]","Display HTML text."
2724
Console,command,INPUT,527,"INPUT [prompt,|;] var[, var [, ...]]","Reads from ""keyboard"" text and stores it to a variable."
2825
Console,command,LINEINPUT,528,"LINEINPUT [#fileN] var","Reads a whole text line from file or console."
2926
Console,command,LINPUT,529,"LINPUT [#fileN] var","Reads a whole text line from file or console."
@@ -34,7 +31,6 @@ Console,command,PEN,533,"PEN ON|OFF","Enables/Disables the PEN/MOUSE mechanism."
3431
Console,command,PLAY,534,"PLAY string","Play musical notes."
3532
Console,command,PRINT,535,"PRINT [USING [format];] [expr|str [,|; [expr|str]] ...","Display text or the value of an expression."
3633
Console,command,SOUND,536,"SOUND freq, dur_ms [, vol] [BG]","Plays a sound."
37-
Console,command,TEXT,537,"TEXT x, y, w, h, variable","Create an input text widget for display using FORM. See BUTTON for special values for x, y, w, h"
3834
Console,function,CAT,538,"CAT (x)","Returns a console code. 0 = reset, 1 = bold, -1 bold-off, 2 = underline, -2 = underline-off, 3 = reverse, -3 = reverse-off."
3935
Console,function,INKEY,539,"INKEY","Returns the last key-code in keyboard buffer, or an empty string if there are no keys. Special key-codes like the function-keys (PC) or the hardware-buttons (PalmOS) are returned as 2-byte string."
4036
Console,function,TAB,540,"TAB (n)","Moves cursor position to the nth column."
@@ -119,8 +115,6 @@ Graphics,command,PSET,621,"PSET [STEP] x,y [, color| COLOR color]","Draw a pixel
119115
Graphics,command,RECT,622,"RECT [STEP] x,y [,|STEP x2,y2] [, color| COLOR color] [FILLED]","Draws a rectangular parallelogram."
120116
Graphics,command,VIEW,623,"VIEW [x1,y1,x2,y2 [,color [,border-color]]]","Defines a viewport. The viewport defined by VIEW is disabled by a VIEW command with no parameters."
121117
Graphics,command,WINDOW,624,"WINDOW [x1,y1,x2,y2]","The WINDOW command allows you to redefine the corners of the display screen as a pair of ""world"" coordinates."
122-
Graphics,function,IMAGEH,625,"IMAGEH #handle, index","Returns the height of the image in pixels."
123-
Graphics,function,IMAGEW,626,"IMAGEW #handle, index","Returns the width of the image in pixels."
124118
Graphics,function,PEN,627,"PEN (0..14)","Returns the PEN/MOUSE data."
125119
Graphics,function,POINT,628,"POINT (x [, y])","Returns the color of the pixel at x,y."
126120
Graphics,function,RGB,629,"RGB (r, g, b)","Returns the RGB color codes for the specified values. Takes values 0..255 for each of the color."
@@ -285,7 +279,6 @@ System,command,DELAY,806,"DELAY ms","Delay for a specified amount of millisecond
285279
System,command,ENV,807,"ENV expr","See ENVIRON."
286280
System,command,ENVIRON,808,"ENVIRON expr","Adds a variable to or deletes a variable from the current environment variable-table."
287281
System,command,PAUSE,809,"PAUSE [secs]","Pauses the execution for a specified length of time, or until user hit the keyboard."
288-
System,command,RTE,811,"RTE [info [, ...]]","Creates a Run-Time-Error. The parameters will be displayed on error-line."
289282
System,command,STKDUMP,812,"STKDUMP","Display internal execution stack."
290283
System,command,TROFF,813,"TROFF","See TRON."
291284
System,command,TRON,814,"TRON","When trace mechanism is ON, displays each line number as the program is executed."
@@ -296,3 +289,22 @@ System,function,RUN,818,"RUN cmdstr","Loads a secondary copy of system's shell a
296289
System,function,TICKS,819,"TICKS","Returns the system-ticks. The tick value is depended on operating system."
297290
System,function,TICKSPERSEC,820,"TICKSPERSEC","Returns the number of ticks per second."
298291
System,function,TIMER,821,"TIMER","Returns the number of seconds from midnight."
292+
Language,keyword,DECLARE,0,"DECLARE FUNC xxx","Forward declare SUB or FUNC. Obsolete QB compatibility"
293+
Language,keyword,TO,0,"FOR t = 1 TO 10","Specifies the loop counter end in a FOR loop"
294+
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,"",""
298+
Language,keyword,TRY,0,"TRY","The TRY statement introduces a TRY/CATCH BLOCK"
299+
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."
300+
Language,keyword,END TRY,0,"END TRY","The END TRY statement marks the end of a TRY/CATCH block."
301+
Language,keyword,BG,0,"SOUND frq, dur [, vol] [BG]","Play sound in the background. This prevent the program from blocking while the sound plays."
302+
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,"",""
306+
Graphics,command,SHOWPAGE,0,"SHOWPAGE","This command is used to display pending graphics operations allowing for smooth animations."
307+
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)."
309+
Data,function,ARRAY,0,"ARRAY [var | expr]","Creates a ARRAY or MAP variable from the given string or expression"
310+
Console,command,FORM,0,"FORM","Create a form widget. "

0 commit comments

Comments
 (0)