Skip to content

Commit 3db478c

Browse files
committed
Add CODE documentation
1 parent 39c0156 commit 3db478c

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

docs/code.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#CODE
2+
3+
##Syntax
4+
5+
6+
```
7+
code(<value>)
8+
```
9+
10+
##Description
11+
12+
Returns the ASCII code of the first character of the given string value.
13+
If the string is empty, the returned value is 0.
14+
Returned value type is [UByte](types.md#UByte).
15+
16+
##Examples
17+
18+
```
19+
REM ASCII CODE of "A"
20+
PRINT "ASCII CODE of A is "; CODE("A")
21+
LET a$ = ""
22+
PRINT "ASCII CODE of emtpy string is "; CODE(a$)
23+
```
24+
25+
##Remarks
26+
27+
* This function is 100% Sinclair BASIC Compatible
28+
29+
##See Also
30+
31+
* [CHR](chr.md)
32+
* [STR](str.md)

0 commit comments

Comments
 (0)