Replies: 1 comment 1 reply
-
This problem cannot be solved in Forth. A user can redefine line comment (or introduce an own variant):
Or It's confused if these words can be commented by So they should be considered as a top-level markup, which should not appear in comments or string literals. This problem was also discussed on forth-standard.org. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The Forth Draft 19.1 reference implementation for
[ELSE]
(section E.15.6.2.2531) should be improved to allow for single-line commented[IF]
,[ELSE]
, and[THEN]
words. I stumbled on this cause I had commented out some conditional compilation words while experimenting / tweaking some code and started to notice some odd behaviour.Consider the following revised test cases:
The following revised
[ELSE]
solves the above:Note the above does not handle parenthesis comments (which I tend not to use if possible).
Beta Was this translation helpful? Give feedback.
All reactions