A simple scripting language in C++
Ferenc Szontágh
2025-04-19 55abb4f6f81fc370e349385b38dffb05fa9d5dcb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# String Escape Sequences Feature Test
 
// Newline
string $new = "Hello\nWorld";
print("$new ->\n", $new, "\n");
 
// Tab
string $tab = "col1\tcol2";
print("$tab -> [", $tab, "]\n");
 
// Double-quote
string $dq = "\"in quotes\"";
print("$dq -> [", $dq, "]\n");
 
// Unknown escape (\x treated as x)
string $ux = "test\xescape";
print("$ux -> [", $ux, "]\n");