diff --git a/doc/RETRO-Book.md b/doc/RETRO-Book.md index b0c4de0..55c47b2 100644 --- a/doc/RETRO-Book.md +++ b/doc/RETRO-Book.md @@ -3072,6 +3072,17 @@ The headers between `{{` and `---reveal---` are then hidden from the dictionary, leaving only the headers between `---reveal---` and `}}` exposed. +If you wish to hide all headers in a `{{` ... `}}` block, leave +out the `---reveal---`. + +``` +{{ + :a #3 ; + : b a dup * ; +}} +``` + + ## Notes This only affects word visibility within the scoped area. As an @@ -3090,6 +3101,9 @@ example: In this, after `}}` closes the area, the `:a #2 ;` is hidden and the `s:evaluate` will find the `:a #1 ;` when `b` is run. +If you have a `---reveal---` with no definitions following, you +will experience memory corruption. + # The Stacks The stacks are a defining feature of Forth. They are are used diff --git a/doc/book/techniques/lexical-scope b/doc/book/techniques/lexical-scope index 4d6dd0b..0c192cb 100644 --- a/doc/book/techniques/lexical-scope +++ b/doc/book/techniques/lexical-scope @@ -23,6 +23,17 @@ The headers between `{{` and `---reveal---` are then hidden from the dictionary, leaving only the headers between `---reveal---` and `}}` exposed. +If you wish to hide all headers in a `{{` ... `}}` block, leave +out the `---reveal---`. + +``` +{{ + :a #3 ; + : b a dup * ; +}} +``` + + ## Notes This only affects word visibility within the scoped area. As an @@ -40,3 +51,6 @@ example: In this, after `}}` closes the area, the `:a #2 ;` is hidden and the `s:evaluate` will find the `:a #1 ;` when `b` is run. + +If you have a `---reveal---` with no definitions following, you +will experience memory corruption. diff --git a/doc/html/chapters/techniques/lexical-scope.html b/doc/html/chapters/techniques/lexical-scope.html index ca790a2..7b92e3f 100644 --- a/doc/html/chapters/techniques/lexical-scope.html +++ b/doc/html/chapters/techniques/lexical-scope.html @@ -66,6 +66,15 @@ The headers between {{ and ---reveal--- the dictionary, leaving only the headers between ---reveal--- and }} exposed.

+If you wish to hide all headers in a {{ ... }} block, leave +out the ---reveal---. +

+```
{{
+  :a #3 ;
+  : b a dup * ;
+}}
+```


+

Notes

This only affects word visibility within the scoped area. As an @@ -81,5 +90,8 @@ example: ```


In this, after }} closes the area, the :a #2 ; is hidden and the s:evaluate will find the :a #1 ; when b is run. +

+If you have a ---reveal--- with no definitions following, you +will experience memory corruption.