From 2eaf4f0a722a5d83141f69aa834d9d8866324919 Mon Sep 17 00:00:00 2001 From: Centrix14 Date: Thu, 2 Jan 2020 18:58:31 +0300 Subject: [PATCH] added information about the `il`, and examples of using the ssp --- README.md | 2 +- examples/ssp/01_macro.spf | 3 +++ examples/ssp/02_link.spf | 3 +++ examples/ssp/link_me.spf | 1 + 4 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 examples/ssp/01_macro.spf create mode 100644 examples/ssp/02_link.spf create mode 100644 examples/ssp/link_me.spf diff --git a/README.md b/README.md index f17536f..ed5c824 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ ## Overview + `(` / `)` -- take everything in parentheses as a whole works like quotation marks in other languages (`(word1 word2)` - will be read as "word1 word2") - + `:` -- initialize the current selected element with a value (`:12` - now element 0 stores the value 12) + + `:` -- initialize the current selected element with a value (`:12` - now element 0 stores the value 12). If `il` is specified as an argument, the element will be initialized with the length of the interval (see the description of the `[` & `]` commands). + `^` -- go to the item with the number (`^123` - now 123 is the current work item) + `>` / `<` -- move right / left in the array (`>>` - move the current work item pointer 2 items forward) + `_!` -- display the value of the current item (`:123(_!)` - displays the value of element 123 on the screen) diff --git a/examples/ssp/01_macro.spf b/examples/ssp/01_macro.spf new file mode 100644 index 0000000..b4fca08 --- /dev/null +++ b/examples/ssp/01_macro.spf @@ -0,0 +1,3 @@ +.macro var 0 + +^ var : 123 (_!) diff --git a/examples/ssp/02_link.spf b/examples/ssp/02_link.spf new file mode 100644 index 0000000..7f8c5a6 --- /dev/null +++ b/examples/ssp/02_link.spf @@ -0,0 +1,3 @@ +.link link_me.spf + +print diff --git a/examples/ssp/link_me.spf b/examples/ssp/link_me.spf new file mode 100644 index 0000000..397cb87 --- /dev/null +++ b/examples/ssp/link_me.spf @@ -0,0 +1 @@ +.macro print {|(Hello from link_me.spf!)@(-!)}