|
| 1 | +Language reference |
| 2 | +================== |
| 3 | + |
| 4 | +BASIC is a very simple language and it is a perfect tool for calculations or utilities. |
| 5 | +Its name stands for (B)eginners (A)ll-purpose (S)ymbolic (I)nstruction (c)ode. It was developed by John |
| 6 | +Kemeny and Thomas Kurtz at Dartmouth College during the middle of 1960, and was one of the most |
| 7 | +popular languages for several decades. {.roleNote} |
| 8 | + |
| 9 | +How to read the language reference syntax |
| 10 | +----------------------------------------- |
| 11 | + |
| 12 | +* Everything written inside of [] characters are optional values. |
| 13 | +* Everything written inside of { characters means you must select one of them. |
| 14 | +* The symbol | means OR. |
| 15 | +* The symbols ... mean you can repeat the previous syntax. |
| 16 | +* Keywords are written with capital letters. |
| 17 | +* Parameters are written with lower letters. |
| 18 | +* Keywords with suffix () are functions. |
| 19 | +* Parameters with suffix () are arrays. |
| 20 | + |
| 21 | +~~~ |
| 22 | +FOO <- This is keyword |
| 23 | +FOO() <- This is function |
| 24 | +foo <- This is variable/parameter |
| 25 | +foo() <- This is array/parameter |
| 26 | +{A|B} <- This means that you must type A or B |
| 27 | +[{A|B}] <- This means that you must use A or B or nothing |
| 28 | +~~~ |
| 29 | + |
| 30 | +The following example means that you must give the first parameter (a) but you can use the second (x) |
| 31 | +only if you want to. But if you want to use the (x) you must also separate it from (a) with a comma. |
| 32 | + |
| 33 | +~~~FOO a[, x]~~~ |
| 34 | +
|
| 35 | +The next example means that you must use the first parameter. You can also use second parameter |
| 36 | +but you must separate it with ',' or ';'. You can also repeat the last syntax more times. |
| 37 | +
|
| 38 | +~~~FOO var [{,|;} var2 [...]]~~~ |
| 39 | +
|
| 40 | + <div class="contentsPanel"> |
| 41 | + <div class="contentsHeader">Contents</div> |
| 42 | + <ul> |
| 43 | + <li><span>1</span><a href="/reference/521.html">Console</a></li> |
| 44 | + <li><span>2</span><a href="/reference/581.html">Data</a></li> |
| 45 | + <li><span>3</span><a href="/reference/575.html">Date</a></li> |
| 46 | + <li><span>4</span><a href="/reference/580.html">File</a></li> |
| 47 | + <li><span>5</span><a href="/reference/611.html">Graphics</a></li> |
| 48 | + <li><span>6</span><a href="/reference/662.html">Language</a></li> |
| 49 | + <li><span>7</span><a href="/reference/704.html">Math</a></li> |
| 50 | + <li><span>8</span><a href="/reference/771.html">String</a></li> |
| 51 | + <li><span>9</span><a href="/reference/1439.html">System</a></li> |
| 52 | + </ul> |
| 53 | + </div> |
| 54 | +
|
| 55 | +You can find |
| 56 | +------------ |
| 57 | +
|
| 58 | +escape codes under Console or under Articles "Escape Codes" |
| 59 | +ARRAY under Data, ISMAP under Data, ISREF under Data |
| 60 | +
|
| 61 | +bit color systems under Graphics |
| 62 | +STEP under Graphics, aspect under Graphics, FILLED under Graphics, QBcolors under COLOR under Graphics |
| 63 | +
|
| 64 | +"system variables" AKA built in coder constants under System eg, pi, xmax, ymax, cwd... |
| 65 | +INCLUDE under System |
| 66 | +
|
| 67 | +Allot of information is under Articles > "Welcome to SmallBASIC": |
| 68 | +operators eg ~ % ^ ! IN LIKE |
| 69 | +special characters eg [ , ;] ARRAY definition << append to array |
| 70 | +basic stuff about variables, subs and functions |
| 71 | +aha! stuff on units, meta commands, options, pseudo operators |
| 72 | +
|
| 73 | +TRY CATCH THROW ENDTRY ... located in Language ref > Language unsorted list |
| 74 | + |
| 75 | +
|
0 commit comments