Skip to content

Commit 44a419f

Browse files
committed
Doc fixes
More link fixes, clarifications and consistency on a few files
1 parent 58af762 commit 44a419f

9 files changed

Lines changed: 19 additions & 14 deletions

File tree

docs/cos.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ COS(numericExpression)
1010
## Description
1111

1212
Returns the cosine value of the given argument.
13-
Argument must be a numeric expression in radians units. Returned value type is [float](types.md#Float).
13+
Argument must be a numeric expression in radians units. Returned value type is [float](types.md#float).
1414

1515
## Examples
1616

@@ -30,4 +30,4 @@ PRINT "Cosine value of a is "; COS(a)
3030
* [SIN](sin.md) and [ASN](asn.md)
3131
* [TAN](tan.md) and [ATN](atn.md)
3232
* [ACS](acs.md)
33-
* Faster library option for lower accuracy trigonometry for games: [FCOS](library/fsin.bas.md#COSINE)
33+
* Faster library option for lower accuracy trigonometry for games: [FCOS](library/fsin.bas.md#cosine-function)

docs/dim.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ empty string, so you don't need to initialize them, though it's recommended.
2626
ZX BASIC allows you to use undeclared variables. In Sinclair BASIC, using an unassigned variable triggered
2727
the error _Variable not found_, but in ZX BASIC it will default to 0 value.
2828

29-
You can enforce variable declaration using the `--explicit` [command line option](zxb.md#Command).
29+
You can enforce variable declaration using the `--explicit` [command line option](zxb.md#command-line-options).
3030
When it's used, the compiler will require every variable to be declared with DIM before being used for the 1st time.
3131

32-
You can also enforce explicit type declaration using the `--strict` [command line option](zxb.md#Command).
32+
You can also enforce explicit type declaration using the `--strict` [command line option](zxb.md#command-line-options).
3333
This way, if you use `DIM` you will be required to declare also the type needed.
3434

3535
When you use an undeclared variable, ZX BASIC will try to guess its type by looking at the context in which
@@ -166,7 +166,7 @@ DIM a([<lower_bound> TO] <upper_bound> [, ...]) AS <type>
166166
### Description
167167

168168
By default, array indexes starts from 0, not from 1 as in Sinclair BASIC. You can change this behavior setting
169-
a different array base index using either a [#pragma option](pragma.md) or a [command line option](zxb.md#Command).
169+
a different array base index using either a [#pragma option](pragma.md) or a [command line option](zxb.md#command-line-options).
170170

171171
### Examples
172172

docs/function.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ END FUNCTION
5858
However, not using types explicitly might have a negative impact on performance.
5959
Better redefine it using data types. Factorial is usually defined on unsigned integers and also returns an unsigned
6060
integer. Also, keep in mind that factorial numbers tends to _grow up very quickly_ (e.g. Factorial of 10 is 3628800),
61-
so `ULong` [type](types.md#Integral) (32 bits unsigned) seems to be the most suitable for this function.
61+
so `ULong` [type](types.md#integral) (32 bits unsigned) seems to be the most suitable for this function.
6262

6363
This version is faster (just the 1st line is changed):
6464

docs/in.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ IN <port number>
1111
## Description
1212

1313
Returns the byte value read in the given port.
14-
Argument must be a numeric expression. Returned value type is [Ubyte](types.md#Ubyte).
14+
Argument must be a numeric expression. Returned value type is [Ubyte](types.md#integral).
1515

1616
## Examples
1717

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* [SDK tools](tools.md)
1313
<br />Tools available in the SDK.
1414

15-
* [Command line options](zxb.md#Command_Line_Options)
15+
* [Command line options](zxb.md#Command-Line-Options)
1616
<br />Command line options table for the compiler (zxb)
1717

1818
## Download

docs/inkey.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,7 @@ The above code will echo keys pressed to the screen. Note that the loop has to b
2626

2727
## Remarks
2828
* This sentence is 100% Sinclair BASIC Compatible
29+
30+
## See also
31+
32+
* [INPUT](input.md)

docs/lbound.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ PRINT LBound(a, 0): REM Prints 2, since 'a' has 2 dimensions
3535

3636
## Remarks
3737

38-
* This function does not exists in Sinclair BASIC.
38+
* This function does not exist in Sinclair BASIC.
3939

4040
## See also
4141

docs/library/stdlib.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ Some libraries might be available only for some architectures. If so,
55
they will be signaled as such. If no notice is shown, they are available for
66
all.
77

8-
* [keys.bas](d)<br />
8+
* [keys.bas](keys.bas.md)<br />
99
Faster and efficient way to detect keys pressed.
1010

11-
* [string.bas](.md)<br />
11+
* [string.bas](string.bas.md)<br />
1212
Library for string manipulation.

docs/zxb.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ messages (for example, to call ZX BASIC compiler from within an
159159
<abbr title="Integrated Development Environment">IDE</abbr>).
160160

161161
* **--array-base**
162-
<br />Unlike original Sinclair BASIC, array indexes starts from 0, not from 1 (see [DIM](dim.md)).
162+
<br />Unlike original Sinclair BASIC, array indexes starts from 0, not from 1 (see [DIM](dim.md#array-declaration)).
163163
You can change this behavior. For example setting `--array-base=1` will make array indexes start from 1
164164
(like in Sinclair BASIC). This option (array-base=1) is active when `--sinclair` compatibility flag is specified.
165165

@@ -211,8 +211,9 @@ This option is really useful and you should enable it for large programs.
211211

212212
* **--strict**
213213
<br /> Requires all variables (and parameters and functions!) to have an explicit type declared
214-
(e.g. [Uinteger](types.md)). Otherwise, forgetting a type will cause an error and the program won't compile.
214+
(e.g. [Uinteger](types.md#integral)). Otherwise, forgetting a type will cause an error and the program won't compile.
215215
This is very useful to avoid forgetting type declarations. When the type is explicitly declared the compiler can make
216216
better assumptions and further error checking and optimizations.
217217

218-
This is all you need to know to use the compiler. Proceed to the [ZX BASIC](language.md) page for a language reference.
218+
This is all you need to know to use the compiler. Proceed to the [ZX BASIC](index.md#language-reference) page for a
219+
language reference.

0 commit comments

Comments
 (0)