docs: clarify that ---reveal--- can be left out and using it without public names will corrupt memory.
FossilOrigin-Name: ecf434a6642f69195a8637bd44bbdded5fde50e21638f23d576b282c1c079bec
This commit is contained in:
parent
3af723f9fd
commit
ca23660abe
3 changed files with 40 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -66,6 +66,15 @@ The headers between <span class="tt">{{</span> and <span class="tt">---reveal---
|
|||
the dictionary, leaving only the headers between <span class="tt">---reveal---</span>
|
||||
and <span class="tt">}}</span> exposed.
|
||||
<br/><br/>
|
||||
If you wish to hide all headers in a <span class="tt">{{</span> ... <span class="tt">}}</span> block, leave
|
||||
out the <span class="tt">---reveal---</span>.
|
||||
<br/><br/>
|
||||
<span class='codeblock'><span class="tt">```</span><br/><span class="tt">{{ </span><br/>
|
||||
<span class="tt"> <span class='colon'>:a</span> <span class='num'>#3</span> <span class='imm'>;</span> </span><br/>
|
||||
<span class="tt"> <span class='colon'>:</span> b a <span class='prim'>dup</span> <span class='prim'>*</span> <span class='imm'>;</span> </span><br/>
|
||||
<span class="tt">}} </span><br/>
|
||||
<span class="tt">```</span></span><br/><br/>
|
||||
<br/><br/>
|
||||
<span class="h2">Notes</span>
|
||||
<br/><br/>
|
||||
This only affects word visibility within the scoped area. As an
|
||||
|
@ -81,5 +90,8 @@ example:
|
|||
<span class="tt">```</span></span><br/><br/>
|
||||
In this, after <span class="tt">}}</span> closes the area, the <span class="tt">:a #2 ;</span> is hidden and
|
||||
the <span class="tt">s:evaluate</span> will find the <span class="tt">:a #1 ;</span> when <span class="tt">b</span> is run.
|
||||
<br/><br/>
|
||||
If you have a <span class="tt">---reveal---</span> with no definitions following, you
|
||||
will experience memory corruption.
|
||||
</p>
|
||||
</body></html>
|
||||
|
|
Loading…
Reference in a new issue