diff --git a/doc/An_Introduction_To_Retro.md b/doc/An_Introduction_To_Retro.md index 09275a1..4bfe6e2 100644 --- a/doc/An_Introduction_To_Retro.md +++ b/doc/An_Introduction_To_Retro.md @@ -128,7 +128,7 @@ To create new functions, you use the compiler. This is generally started by using the `:` (pronounced *colon*) prefix. A simple example: - :foo #1 #2 + putn ; + :foo #1 #2 + n:put ; Breaking this apart: @@ -157,13 +157,13 @@ calls the corresponding class handler. The class handler for normal words calls the code at the address if interpreting, or compiles a call to it if the `Compiler` is active. - putn + n:put -The process is repeated for `putn`. +The process is repeated for `n:put`. ; -The last word has a slight difference. Like `+` and `putn`, this +The last word has a slight difference. Like `+` and `n:put`, this is a word, not a prefixed token. But the class handler for this one always calls the associated code. In this case, `;` is the word which ends a definition and turns off the `Compiler`. @@ -178,15 +178,15 @@ difficult to explain, so let's take a quick look at how it works: >>> A ? #1000 'A var :scale (x-y) A fetch * ; - #3 scale putn + #3 scale n:put >>> 3000 #100 A store - #3 scale putn + #3 scale n:put >>> 300 #5 'A var - #3 scale putn + #3 scale n:put >>> 300 - A fetch putn + A fetch n:put >>> 5 Output is marked with **>>>**. @@ -321,9 +321,9 @@ Comparisons ----------- Strings can be compared using `s:eq?`: - 'test_1 'test_2 s:eq? putn + 'test_1 'test_2 s:eq? n:put >>> 0 - 'test_3 'test_3 s:eq? putn + 'test_3 'test_3 s:eq? n:put >>> -1 The comparisons are case sensitive. diff --git a/doc/Hyperstatic.md b/doc/Hyperstatic.md index 788b8c9..8ed07b7 100644 --- a/doc/Hyperstatic.md +++ b/doc/Hyperstatic.md @@ -7,15 +7,15 @@ take a quick look at how it works: ~~~ #1000 'a var :scale (x-y) @a * ; - #3 scale putn + #3 scale n:put >>> 3000 #100 !a - #3 scale putn + #3 scale n:put >>> 300 #5 'a var - #3 scale putn + #3 scale n:put >>> 300 - @a putn + @a n:put >>> 5 ~~~ diff --git a/doc/QuickRef.md b/doc/QuickRef.md index c9d149d..e09fdd4 100644 --- a/doc/QuickRef.md +++ b/doc/QuickRef.md @@ -6,26 +6,26 @@ Displaying Things Numbers ======= - #100 putn + #100 n:put Characters ========== - $a putc + $a c:put Strings ======= - 'hello,_world puts + 'hello,_world s:put Mixed ===== - #1 #2 #3 '%n_-_%n_=_%n\n s:format puts - 'Charles' 'Hello_%s\n s:format puts + #1 #2 #3 '%n_-_%n_=_%n\n s:format s:put + 'Charles' 'Hello_%s\n s:format s:put Conditionals @@ -134,13 +134,13 @@ Counted ======= (simple,_no_index_on_stack) - #10 [ $a putc ] times + #10 [ $a c:put ] times Conditional =========== - #10 [ n:dec dup putn dup n:-zero? ] while + #10 [ n:dec dup n:put dup n:-zero? ] while Math diff --git a/doc/QuotesAndCombinators.md b/doc/QuotesAndCombinators.md index a41984f..80f0977 100644 --- a/doc/QuotesAndCombinators.md +++ b/doc/QuotesAndCombinators.md @@ -25,22 +25,22 @@ flag is `TRUE`: ~~~ #1 #2 eq? - [ 'True! puts ] if + [ 'True! s:put ] if ~~~ Or if it's `FALSE`: ~~~ #1 #2 eq? - [ 'Not_true! puts ] -if + [ 'Not_true! s:put ] -if ~~~ There's also a `choose` combinator: ~~~ #1 #2 eq? - [ 'True! puts ] - [ 'Not_true! puts ] choose + [ 'True! s:put ] + [ 'Not_true! s:put ] choose ~~~ RETRO also uses combinators for loops: @@ -48,7 +48,7 @@ RETRO also uses combinators for loops: A counted loop takes a count and a quote: ~~~ - #0 #100 [ dup putn sp n:inc ] times + #0 #100 [ dup n:put sp n:inc ] times ~~~ You can also loop while a quote returns a flag of `TRUE`: @@ -68,7 +68,7 @@ instance, many structures provide a `for-each` combinator which can be run once for each item in the structure. E.g., with a string: ~~~ - 'Hello [ putc ] s:for-each + 'Hello [ c:put ] s:for-each ~~~ Moving further, combinators are also used for filters and operations on diff --git a/doc/Syntax.md b/doc/Syntax.md index c1ba739..d9ad7e3 100644 --- a/doc/Syntax.md +++ b/doc/Syntax.md @@ -31,7 +31,7 @@ Example: (Define_some_words) :hello (-) - 'Hello_World! puts nl ; + 'Hello_World! s:put nl ; :n:square (n-m) dup * ; @@ -44,9 +44,9 @@ hello $a (this_is_the_ASCII_'a') 'Use_underscores_in_place_of_spaces_in_strings -&puts call +&s:put call 'Foo var #100 !Foo -@Foo putn +@Foo n:put ~~~