Skip to content

Commit f34b04d

Browse files
update real and string docs
1 parent aea7272 commit f34b04d

File tree

611 files changed

+11103
-2898
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

611 files changed

+11103
-2898
lines changed

docpages/basic-language-reference/functions/integer/02_INDEX.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
- \subpage PEEKQ
4444
- \subpage PEEKW
4545
- \subpage RADIX
46-
- \subpage READ
46+
- \subpage IREAD
4747
- \subpage RGB
4848
- \subpage RND
4949
- \subpage SECOND

docpages/basic-language-reference/functions/integer/READ.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
\page READ READ Function
1+
\page IREAD READ Function
22

33
```basic
44
READ(integer-variable)

docpages/basic-language-reference/functions/real/03_INDEX.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@
1616
- \subpage REALVAL
1717
- \subpage ROUND
1818
- \subpage SIN
19+
- \subpage SQR
1920
- \subpage TAN
Lines changed: 51 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,55 @@
11
\page ACS ACS Function
2-
```
2+
3+
```basic
34
ACS(real-expression)
45
```
5-
Returns the arc cosine (inverse cosine) of the provided expression, in radians.
66

7-
The input must be between -1 and 1.
7+
Returns the **arc cosine** (inverse cosine) of the given expression, in **radians**.
8+
The input must be between `-1` and `1`.
9+
10+
---
11+
12+
### Examples
13+
14+
```basic
15+
PRINT ACS(1)
16+
```
17+
18+
Produces `0`.
19+
20+
```basic
21+
PRINT ACS(0)
22+
```
23+
24+
Produces approximately `1.570796` (π/2).
25+
26+
```basic
27+
PRINT ACS(-1)
28+
```
29+
30+
Produces approximately `3.141593` (π).
31+
32+
```basic
33+
REM Validate a cosine identity
34+
angle# = 0.75
35+
PRINT ACS(COS(angle#))
36+
```
37+
38+
Produces the original angle (within floating point accuracy).
39+
40+
---
41+
42+
### Notes
43+
44+
* Argument range: `-1 ≤ x ≤ 1`. Values outside this range cause an error.
45+
* Return range: `0 ≤ result ≤ π` radians.
46+
* To convert the result to degrees, multiply by `180 / PI`.
47+
* Inverse functions:
48+
49+
* \ref ASN "ASN" (arc sine)
50+
* \ref ATN "ATN" (arc tangent)
51+
52+
---
53+
54+
**See also:**
55+
\ref COS "COS" · \ref ASN "ASN" · \ref ATN "ATN" · \ref TAN "TAN"
Lines changed: 51 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,55 @@
11
\page ASN ASN Function
2-
```
2+
3+
```basic
34
ASN(real-expression)
45
```
5-
Returns the arc sine (inverse sine) of the provided expression, in radians.
66

7-
The input must be between -1 and 1.
7+
Returns the **arc sine** (inverse sine) of the given expression, in **radians**.
8+
The input must be between `-1` and `1`.
9+
10+
---
11+
12+
### Examples
13+
14+
```basic
15+
PRINT ASN(0)
16+
```
17+
18+
Produces `0`.
19+
20+
```basic
21+
PRINT ASN(1)
22+
```
23+
24+
Produces approximately `1.570796` (π/2).
25+
26+
```basic
27+
PRINT ASN(-1)
28+
```
29+
30+
Produces approximately `-1.570796` (-π/2).
31+
32+
```basic
33+
REM Validate a sine identity
34+
angle# = 0.5
35+
PRINT ASN(SIN(angle#))
36+
```
37+
38+
Produces the original angle (within floating point accuracy).
39+
40+
---
41+
42+
### Notes
43+
44+
* Argument range: `-1 ≤ x ≤ 1`. Values outside this range cause an error.
45+
* Return range: `-π/2 ≤ result ≤ π/2` radians.
46+
* To convert the result to degrees, multiply by `180 / PI`.
47+
* Inverse functions:
48+
49+
* \ref ACS "ACS" (arc cosine)
50+
* \ref ATN "ATN" (arc tangent)
51+
52+
---
53+
54+
**See also:**
55+
\ref SIN "SIN" · \ref ACS "ACS" · \ref ATN "ATN" · \ref TAN "TAN"
Lines changed: 49 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,53 @@
11
\page ATAN ATAN Function
2-
```
2+
3+
```basic
34
ATAN(real-expression)
45
```
5-
Returns the arc tangent of the provided expression (in radians).
66

7-
The result will be between `-PI#/2` and `PI#/2`.
7+
Returns the **arc tangent** (inverse tangent) of the given expression, in **radians**.
8+
9+
The result will always lie between `-PI#/2` and `PI#/2`.
10+
11+
---
12+
13+
### Examples
14+
15+
```basic
16+
PRINT ATAN(0)
17+
```
18+
19+
Produces `0`.
20+
21+
```basic
22+
PRINT ATAN(1)
23+
```
24+
25+
Produces approximately `0.785398` (π/4).
26+
27+
```basic
28+
PRINT ATAN(-1)
29+
```
30+
31+
Produces approximately `-0.785398` (-π/4).
32+
33+
```basic
34+
REM Validate a tangent identity
35+
angle# = 0.3
36+
PRINT ATAN(TAN(angle#))
37+
```
38+
39+
Produces the original angle (within floating point accuracy).
40+
41+
---
42+
43+
### Notes
44+
45+
* Input range: any real number is valid.
46+
* Return range: `-π/2 ≤ result ≤ π/2` radians.
47+
* To convert the result to degrees, multiply by `180 / PI`.
48+
* For quadrant-aware arc tangent with two arguments (x,y), use \ref ATAN2 "ATAN2".
49+
50+
---
51+
52+
**See also:**
53+
\ref TAN "TAN" · \ref ATAN2 "ATAN2" · \ref ACS "ACS" · \ref ASN "ASN"
Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,58 @@
11
\page ATAN2 ATAN2 Function
2-
```
2+
3+
```basic
34
ATAN2(real-y, real-x)
45
```
5-
Returns the arc tangent of y / x, using the signs of both arguments to determine the correct quadrant.
66

7-
The result will be between `-PI#` and `PI#`.
7+
Returns the **arc tangent of y ÷ x**, using the signs of both arguments to determine the correct **quadrant** of the angle.
8+
The result is given in **radians**, in the range `-PI#` to `PI#`.
9+
10+
---
11+
12+
### Examples
13+
14+
```basic
15+
PRINT ATAN2(1, 1)
16+
```
17+
18+
Produces approximately `0.785398` (π/4).
19+
20+
```basic
21+
PRINT ATAN2(1, -1)
22+
```
23+
24+
Produces approximately `2.356194` (3π/4).
25+
26+
```basic
27+
PRINT ATAN2(-1, -1)
28+
```
29+
30+
Produces approximately `-2.356194` (-3π/4).
31+
32+
```basic
33+
PRINT ATAN2(-1, 1)
34+
```
35+
36+
Produces approximately `-0.785398` (-π/4).
37+
38+
```basic
39+
REM Compute angle of a vector
40+
dx# = 3
41+
dy# = 4
42+
angle# = ATAN2(dy#, dx#)
43+
PRINT "Angle = "; angle#; " radians"
44+
```
45+
46+
---
47+
48+
### Notes
49+
50+
* Unlike \ref ATAN "ATAN", which only returns results in `-π/2 … π/2`, `ATAN2` resolves the full circle by considering both `x` and `y` signs.
51+
* Input range: both arguments may be any real numbers.
52+
* Return range: `-π ≤ result ≤ π` radians.
53+
* To convert to degrees, multiply by `180 / PI`.
54+
55+
---
56+
57+
**See also:**
58+
\ref ATAN "ATAN" · \ref SIN "SIN" · \ref COS "COS" · \ref TAN "TAN"
Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,45 @@
11
\page CEIL CEIL Function
2-
```
2+
3+
```basic
34
CEIL(real-expression)
45
```
5-
Rounds the provided value up to the nearest integer.
66

7-
For example, CEIL(3.2) returns 4.
7+
Rounds the provided real value **upwards** to the nearest integer.
8+
The result is the smallest integer greater than or equal to the input.
9+
10+
---
11+
12+
### Examples
13+
14+
```basic
15+
PRINT CEIL(3.2)
16+
```
17+
18+
Produces `4`.
19+
20+
```basic
21+
PRINT CEIL(-3.2)
22+
```
23+
24+
Produces `-3`.
25+
26+
```basic
27+
REM Use CEIL to calculate number of pages needed
28+
items = 23
29+
perPage = 10
30+
pages = CEIL(items / perPage)
31+
PRINT "Pages required = "; pages
32+
```
33+
34+
---
35+
36+
### Notes
37+
38+
* Always rounds **towards positive infinity**.
39+
* Return type is a 64-bit integer.
40+
* Differs from \ref INT "INT", which truncates towards zero, and \ref ROUND "ROUND", which rounds to the nearest integer.
41+
42+
---
43+
44+
**See also:**
45+
\ref FLOOR "FLOOR" · \ref INT "INT" · \ref ROUND "ROUND"
Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,54 @@
11
\page COS COS Function
2+
23
```basic
34
COS(real-expression)
45
```
5-
Returns the cosine of the provided expression
66

7+
Returns the **cosine** of the given angle, where the angle is expressed in **radians**.
8+
9+
---
10+
11+
### Examples
12+
13+
```basic
14+
PRINT COS(0)
15+
```
16+
17+
Produces `1`.
18+
19+
```basic
20+
PRINT COS(PI# / 2)
21+
```
22+
23+
Produces approximately `0`.
24+
25+
```basic
26+
PRINT COS(PI#)
27+
```
28+
29+
Produces `-1`.
30+
31+
```basic
32+
REM Plot cosine values for multiples of 45 degrees
33+
FOR d = 0 TO 360 STEP 45
34+
r# = d * PI# / 180
35+
PRINT "COS("; d; "°) = "; COS(r#)
36+
NEXT
37+
```
38+
39+
---
40+
41+
### Notes
42+
43+
* Argument is in **radians**. Convert degrees to radians with:
44+
45+
```basic
46+
radians# = degrees * PI# / 180
47+
```
48+
* Return value is a real number between `-1` and `1`.
49+
* Related inverse function: \ref ACS "ACS".
50+
51+
---
52+
53+
**See also:**
54+
\ref SIN "SIN" · \ref TAN "TAN" · \ref ACS "ACS" · \ref ATAN "ATAN"

0 commit comments

Comments
 (0)