From 900487de916a7bf185fa8fc74c226f9c4899dd73 Mon Sep 17 00:00:00 2001 From: DrMaxNix Date: Sun, 17 Apr 2022 13:08:54 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Add=20escape=20sequences=20and=20in?= =?UTF-8?q?teger=20prefixes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ideas-1.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ideas-1.sh b/ideas-1.sh index 2c0e1cd..1a64277 100644 --- a/ideas-1.sh +++ b/ideas-1.sh @@ -14,6 +14,19 @@ mov $a 42 ; comment 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 ## # $2 => $1 @@ -209,6 +222,9 @@ rnd|rand|random $num 5 13 ## STRING MANIPULATION ## +# get utf-8 char with id $1 +chr $1 | cast $1 str + # get string lenght len $string $length_num