,---------------. | Contributions | `---------------´ ,------------------------------------------ | 2021-01-22 02:52:22 JimPeterson wrote: | requestClarification - Is Tick Immediate? | see: https://forth-standard.org/standard/core/Tick#contribution-176 `------------------------------------------ I'm confused. Is ' an immediate word or not? If I do: ``` : test ' DUP ; 1 test SWAP ``` Do I get: ( xtD 1 ) where xtD is the execution token of DUP that got swapped with the 1, or do I get: ( 1 xtS xtS ) where xtS is the execution token of SWAP that got duplicated? The existence of ['] certainly implies that ' is not immediate, and that if you want to have an immediate effect, you should use [']. Maybe that's what the documentation is trying to imply by not having separate "Compilation:" and "Runtime:" sections for this word? Many of the simpler words don't have such sections. Still, it may be better to explicitly state when the parsing and finding occurs... just for the sake of clarity. Maybe add another test to the "Testing:" section? ,------------------------------------------ | 2021-01-23 01:10:23 JimPeterson wrote: | comment - Run-Time Section is Missing Words | see: https://forth-standard.org/standard/locals/bColon#contribution-178 `------------------------------------------ Under the "Run-time:" section it says: ``` 1. names are initialized ... 2. names are uninitialized. ``` I suspect it might mean to say: ``` 1. names are initialized... 2. names are unitialized. ``` [In typing this response, I've noticed that the markdown format seems to eliminate things in greater/less brackets unless explicit care is given. That may be the reason -- that it just isn't rendering properly.] ,---------. | Replies | `---------´ ,------------------------------------------ | 2021-01-22 20:48:21 JimPeterson replies: | referenceImplementation - Suggested reference implementation | see: https://forth-standard.org/standard/core/TYPE#reply-595 `------------------------------------------ What about this: ``` : TYPE ( c-addr u -- ) 0 ?DO COUNT EMIT LOOP DROP ; ``` It's kind of crazy, and still no XCHAR support, but COUNT is *very* (overly?) specific about what it does. ,------------------------------------------ | 2021-01-23 01:36:26 MitraArdron replies: | example - Needs an example of replacing COMPILE | see: https://forth-standard.org/standard/core/POSTPONE#reply-596 `------------------------------------------ Thanks for catching my mistake - I think that clarification should be added in the text above, because this is two VERY different behaviors, i.e. in ``` : ENDIF POSTPONE THEN ; IMMEDIATE : AGAIN POSTPONE branch compile ( xt1 xt2 ) swap postpone literal compile, ; ``` Sure, if your system uses a header flag for "immediate", NAME>COMPILE will check that flag, but other systems are possible. E.g., in Gforth NAME>COMPILE is equivalent to ``` : NAME>COMPILE ( nt -- x xt ) dup cell- @ >vt>comp @ execute ; ``` I made two attempts to explain semantics: one in [2000 (slight revision in 2004)](http://www.complang.tuwien.ac.at/forth/dpans-html/comment-semantics.html) and one in [2010](http://www.forth200x.org/drafts/semantics). But there is no consensus on the Forth200x committee about adding such explanations, so nothing in this direction has been added to the standards document yet.