Skip to content

Commit

Permalink
Example scripts for string operators and string escape sequences.
Browse files Browse the repository at this point in the history
  • Loading branch information
nthnn committed Jun 30, 2024
1 parent 930c931 commit a4b678f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/example_26.utx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/local/bin/uartix
# String operation example.

render (~"Hello") + "\r\n";
render "Go! " * 3;
11 changes: 11 additions & 0 deletions examples/example_27.utx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/local/bin/uartix
# String escape sequence examples.

render "Hello,\nWorld!\r\n";
render "Hello,\rWorld!\r\n";
render "Hello,\tWorld!\r\n";
render "Hello,\bWorld!\r\n";
render "Hello,\fWorld!\r\n";
render "They say, \"Hello, World!\"\r\n";
render "This is a backslash: \\\r\n";
render "Smiley face: \u263A\r\n";

0 comments on commit a4b678f

Please sign in to comment.