0
0

Add escape sequences and integer prefixes

This commit is contained in:
DrMaxNix 2022-04-17 13:08:54 +02:00 committed by GitHub
parent 94a61b1e38
commit 900487de91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,6 +14,19 @@ mov $a 42 ; comment
mov /* Inline block comment */ $a 42 mov /* Inline block comment */ $a 42
## ESCAPE SEQUENCES AND INTEGER PREFIXES ##
# in strings
"\n" # newline
"\t" # tab
"\u2764\ufe0f" # utf-8 for ❤️
...
# integers
0x10 # hexadecimal: 16
0o10 # octal: 8
0b0100 # binary: 4
## VARIABLES ## ## VARIABLES ##
# $2 => $1 # $2 => $1
@ -209,6 +222,9 @@ rnd|rand|random $num 5 13
## STRING MANIPULATION ## ## STRING MANIPULATION ##
# get utf-8 char with id $1
chr $1 | cast $1 str
# get string lenght # get string lenght
len $string $length_num len $string $length_num