Skip to content

Commit 3c32386

Browse files
committed
DOC: update from web
1 parent d6ca36e commit 3c32386

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

documentation/build_kwp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ bool isKeyword(const char *keyword) {
9696
}
9797

9898
const char* constants[] = {
99-
"SBVER", "PI", "XMAX", "YMAX", "TRUE", "FALSE", "CWD", "HOME", "COMMAND", ""
99+
"SBVER", "PI", "XMAX", "YMAX", "TRUE", "FALSE", "CWD", "HOME", "COMMAND", "INCLUDE", ""
100100
};
101-
for (int i = 0; !result && constants[i] != '\0'; i++) {
101+
for (int i = 0; !result && constants[i][0] != '\0'; i++) {
102102
if (strcasecmp(constants[i], keyword) == 0) {
103103
result = true;
104104
}

documentation/sbasic_ref.csv

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ Graphics,command,RECT,622,"RECT [STEP] x,y [,|STEP x2,y2] [, color| COLOR color]
9797
Graphics,command,SHOWPAGE,1429,"SHOWPAGE","This command is used to display pending graphics operations allowing for smooth animations."
9898
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."
9999
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. WINDOW is also overloaded as a function, returning a system object providing access to the following sub-commands: graphicsScreen1, graphicsScreen2, textScreen, alert, ask, menu, message, showKeypad, insetTextScreen"
100+
Graphics,constant,XMAX,1526,"XMAX","Holds the screen width in pixels"
100101
Graphics,function,PEN,627,"PEN (0..14)","Returns the PEN/MOUSE data."
101102
Graphics,function,POINT,628,"POINT (x [, y])","Returns the color of the pixel at x,y."
102103
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."
@@ -109,15 +110,9 @@ Graphics,function,XPOS,635,"XPOS","Returns the current X position of the cursor
109110
Graphics,function,YPOS,636,"YPOS","Returns the current Y position of the cursor in ""characters""."
110111
Language,command,CALL,637,"CALL (fp)","Invoke a sub or func by address pointer."
111112
Language,command,THROW,1437,"THROW [info [, ...]]","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."
112-
Language,constant,COMMAND,1459,"COMMAND","SmallBASIC startup command line options."
113-
Language,constant,CWD,1456,"CWD","Current working directory"
114113
Language,constant,FALSE,1457,"FALSE","FALSE"
115-
Language,constant,HOME,1458,"HOME","User HOME folder"
116-
Language,constant,PI,1452,"PI","Holds PI"
117-
Language,constant,SBVER,1451,"SBVER","Version and build information"
118114
Language,constant,TRUE,1455,"TRUE","TRUE"
119-
Language,constant,XMAX,1453,"XMAX","Holds the screen width in pixels"
120-
Language,constant,YMAX,1454,"YMAX","Holds the screen height in pixels."
115+
Graphics,constant,YMAX,1527,"YMAX","Holds the screen height in pixels."
121116
Language,function,IFF,638,"IFF expr","Inline version of IF. eg, animal = ""cat"": fur = IFF( animal = ""cat"", ""yes"", ""no""): ? fur"
122117
Language,keyword,AS,1424,"AS #fileN","See: OPEN"
123118
Language,keyword,BG,1428,"SOUND frq, dur [, vol] [BG]","Play sound in the background. This prevent the program from blocking while the sound plays."
@@ -155,12 +150,14 @@ Language,operator,EQV,665,"a EQV b","Bitwise equivalence."
155150
Language,operator,IMP,666,"a IMP b","Used to perform a logical implication on two expressions."
156151
Language,operator,IN,667,"a IN b","Returns an index (1 Based) to the matching element when b is an array. Returns TRUE if the value is contained within b as a string."
157152
Language,operator,LIKE,668,"a LIKE b","Regular-expression operator. Compares the left part of the expression with the right side regex pattern."
153+
Language,operator,LSHIFT,1496,"result = LSHIFT number, amount","Performs an arithmetic left shift on a bit pattern."
158154
Language,operator,MDL,669,"MDL","Modulus."
159155
Language,operator,MOD,670,"a MOD b","Modulus. Equivalent syntax to the percent character, eg a % b"
160156
Language,operator,NAND,671,"a NAND b","Bitwise exclusive NOT AND."
161157
Language,operator,NOR,672,"a NOR b","Bitwise NOT OR."
162158
Language,operator,NOT,673,"a NOT b","Invert expression result. Equivalent syntax to the exclamation character, eg a ! b"
163159
Language,operator,OR,674,"a OR b","Logical OR. Right side is not evaluated if left side evaluates to True."
160+
Language,operator,RSHIFT,1497,"result = RSHIFT number, amount","Performs an arithmetic right shift on a bit pattern."
164161
Language,operator,XNOR,675,"a XNOR b","Bitwise exclusive NOT OR."
165162
Language,operator,XOR,676,"a XOR b","Bitwise exclusive OR. Equivalent syntax to: a ~ b"
166163
Language,statement,CONST,678,"CONST name = expr","Declare a variable who's value does not change during program execution."
@@ -298,6 +295,11 @@ System,command,RANDOMIZE,810,"RANDOMIZE [int]","Seeds the random number generato
298295
System,command,STKDUMP,812,"STKDUMP","Display internal execution stack."
299296
System,command,TROFF,813,"TROFF","See TRON."
300297
System,command,TRON,814,"TRON","When trace mechanism is ON, displays each line number as the program is executed."
298+
System,constant,COMMAND,1521,"COMMAND","SmallBASIC startup command line options."
299+
System,constant,CWD,1522,"CWD","Current working directory"
300+
System,constant,HOME,1525,"HOME","User HOME folder"
301+
System,constant,PI,1524,"PI","Holds PI"
302+
System,constant,SBVER,1523,"SBVER","Version and build information"
301303
System,function,ENV,815,"ENV expr","Returns the value of a specified entry in the current environment table. If the parameter is empty ("""") then returns an array of the environment variables (in var=value form)."
302304
System,function,FRE,606,"FRE (x)","Returns system information. eg, 0 = free memory, "
303305
System,function,PROGLINE,817,"PROGLINE","Returns the current program line number."
@@ -307,4 +309,5 @@ System,keyword,EXPORT,1440,"EXPORT thing","Export a SUB, FUNC or variable from a
307309
System,keyword,IMPORT,1441,"IMPORT","Import an exported UNIT variable, SUB or FUNC."
308310
System,keyword,UNIT,1446,"UNIT name","Declares the source module as a unit. Units are a set of procedures, functions and/or variables that can be used by another program or unit."
309311
System,statement,CHAIN,1439,"CHAIN source","Compile and run the given source. Source can be a file name, a line of code or an array of code. Use ENV to share variables with the parent process."
312+
System,statement,INCLUDE,1462,"INCLUDE source-file.bas","Inserts code in the named file when the program is compiled. "
310313
System,statement,OPTION,1442,"OPTION keyword","Used to pass parameters to the run-time environment."

0 commit comments

Comments
 (0)