Skip to content

Commit c9f3dba

Browse files
committed
DOC: markdown cleanup
1 parent ce04a49 commit c9f3dba

File tree

4 files changed

+41
-17
lines changed

4 files changed

+41
-17
lines changed

_build/reference/535-console-print.markdown

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,38 @@
44
55
Display text or the value of an expression.
66

7+
**PRINT SEPARATORS**
78

8-
*PRINT SEPARATORS*
99
------- -----------------------------------------
1010
TAB(n) Moves cursor position to the nth column.
1111
SPC(n) Prints a number of spaces specified by n.
1212
; Carriage return/line feed suppressed after printing.
1313
, Carriage return/line feed suppressed after printing.
1414
------- -----------------------------------------
15-
*PRINT USING*
15+
16+
**PRINT USING**
17+
1618
Print USING uses the FORMAT() function to display numbers and strings. Unlike FORMAT it can also include literals.
19+
1720
* [_] - Print next character as a literal. The combination _#, for example, allows you to include a number sign as a literal in your numeric format.
1821
* [other] Characters other than the foregoing may be included as literals in the format string.
19-
p.. When a PRINT USING command is executed the format will remains on the memory until a new format is passed. Calling a PRINT USING without a new format specified the PRINT will use the format of previous call.
20-
> PRINT USING "##: #,###,##0.00";
22+
23+
When a PRINT USING command is executed the format will remains on the memory until a new format is passed. Calling a PRINT USING without a new format specified the PRINT will use the format of previous call.
24+
25+
```
26+
PRINT USING "##: #,###,##0.00";
2127
FOR i=0 TO 20
2228
PRINT USING; i+1, A(i)
2329
NEXT
2430
....
2531
PRINT USING "Total ###,##0 of \\ \\"; number, "bytes"
32+
```
33+
2634
The symbol ? can be used instead of keyword PRINT You can use 'USG' instead of 'USING'.
2735

28-
quote: It's all in the punctuation at the end of a print statement>
36+
quote: **It's all in the punctuation at the end of a print statement**
2937

3038
~~~
31-
3239
REM 3 ways to print hello five time.bas 2016-03-05 SmallBASIC 0.12.2 [B+=MGA]
3340
'It's all in the punctuation at the end of a print statement
3441
'1) no punctiation = whole print lines CR=carriage return and LF=line feed, ready to go on next line

_build/reference/662-language-and.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ n = 0xFFFFFFFF Band 0x7FFFFFFF
206206
' (not integers) for bitwise operators.
207207
' In that case bit-31 would have been a regular bit (not sign bit).
208208
' But integer manipulation is faster then double number manipulation.
209+
209210
It's interesting...
210211
I know at least one language that solved this conflict internally:
211212
Instead of using 32-Bit signed integers, it uses virtual 31-Bit signed integers.

_build/reference/683-language-if.markdown

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
Tests the expression and IF it evaluates to a non-zero value program flow will resume after the following THEN statement.
66

7-
7+
```
88
IF expression1 [THEN]
99
.
1010
. [commands]
@@ -20,21 +20,29 @@ IF expression1 [THEN]
2020
.
2121
]
2222
ENDIF| FI
23+
```
24+
2325
Block-style IF.
2426
Causes SmallBASIC to make a decision based on the value of an expression.
27+
2528
* expression - An expression; 0 is equivalent to FALSE, while all other values are equivalent to TRUE.
2629
* commands - One or more commands.
27-
p.. Each expression in the IF/ELSEIF construct is tested in order.
30+
31+
Each expression in the IF/ELSEIF construct is tested in order.
2832
As soon as an expression is found to be TRUE, then its corresponding
2933
commands are executed. If no expressions are TRUE, then the commands
3034
following the ELSE keyword are executed. If ELSE is not specified, then
3135
execution continues with the command following the ENDIF.
32-
p.. IF, ELSE, ELSEIF, and ENDIF must all be the first keywords on their respective lines.
33-
p.. THEN is optional, but if its defined it must be the last keyword on its
36+
37+
IF, ELSE, ELSEIF, and ENDIF must all be the first keywords on their respective lines.
38+
39+
THEN is optional, but if its defined it must be the last keyword on its
3440
line; if anything other than a comment follows on the same line with
3541
THEN, BASIC thinks it's reading a single-line IF/THEN/ELSE construct.
3642
IF blocks may be nested.
37-
> x=1
43+
44+
```
45+
x=1
3846
IF x=1 THEN
3947
PRINT "true"
4048
ELSE
@@ -48,17 +56,26 @@ IF x=1
4856
ELSE
4957
PRINT "false"
5058
FI
51-
*Single-line IF*
52-
> IF expression THEN [num-label]|[command] [ELSE [num-label]|[command]]
59+
```
60+
61+
**Single-line IF**
62+
63+
```
64+
IF expression THEN [num-label]|[command] [ELSE [num-label]|[command]]
65+
```
66+
5367
Causes SmallBASIC to make a decision based on the value of an expression.
68+
5469
* expression - An expression; 0 is equivalent to FALSE, while all other values are equivalent to TRUE.
5570
* command - Any legal command or a numeric label. If a number is specified, it is equivalent to a GOTO command with the specified numeric-label.
56-
> ' Single-line IF
71+
72+
```
73+
' Single-line IF
5774
x=1
5875
IF x=1 THEN PRINT "true" ELSE PRINT "false"
5976
...
6077
IF x=1 THEN 1000
6178
...
6279
1000 PRINT "true"
63-
80+
```
6481

_build/reference/686-language-on.markdown

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
55
Causes a branch to one of a list of labels.
66

7-
8-
p.. A numeric expression in the range 0 to 255. Upon execution of the ON...GOTO command (or ON...GOSUB), BASIC branches to the nth item in the list of labels that follows the keyword GOTO (or GOSUB).
7+
A numeric expression in the range 0 to 255. Upon execution of the ON...GOTO command (or ON...GOSUB), BASIC branches to the nth item in the list of labels that follows the keyword GOTO (or GOSUB).
98

109

0 commit comments

Comments
 (0)