You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _build/reference/776-string-chr.markdown
+15-11Lines changed: 15 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,32 +1,34 @@
1
1
# CHR
2
2
3
-
> CHR (x)
3
+
> s = CHR (x)
4
4
5
-
Returns one-char string of character with ASCII code x.
5
+
Returns an one-char string of character with ASCII code `x`.
6
6
7
7
See ASC to convert a character to ASCII code.
8
8
9
-
Example 1:
9
+
### Example 1
10
10
11
11
```
12
-
print "ASCII code 65 is '" + chr(65) + "'"
13
-
14
-
' Output ASCII code 65 is 'A'
12
+
print "ASCII code 65 is '" + chr(65) + "'" ' Output ASCII code 65 is 'A'
15
13
```
16
14
17
-
Example 2: The CHR command is useful for obtaining and printing the escape character (ASCII 27). For more information about escape codes see article "Escape Codes"
15
+
### Example 2: Get escape character
16
+
17
+
The CHR command is useful for obtaining and printing the escape character (ASCII 27). For more information about escape codes see article "Escape Codes"
18
18
19
19
```
20
20
PRINT CHR(27) + "[1mTHIS IS BOLD" + CHR(27) + "[0m"
21
21
PRINT CHR(27) + "[3mThis is italic" + CHR(27) + "[0m"
0 commit comments