Proposal: Known undefined word XLERB
Informal
This page is dedicated to discussing this specific proposal
ContributeContributions
BerndPaysan [368] Known undefined word XLERBProposal2024-11-25 22:50:28
Author:
Bernd Paysan
Change Log:
2024-11-25 initial version
Problem:
For documentation purposes, running tests, and provoking exceptions there is a need for a word that is never in the dictionary.
Solution:
Reserve XLERB
as word that is not in the dictionary. An ambiguous condition exists if the user tries to define XLERB
(a warning probably is sufficient). The name XLERB
has been used in Starting Forth for this documentation purpose.
Typical use:
T{ ' ' catch xlerb -> -13 }T
T{ s" xlerb" find-name -> 0 }T
: e-xlerb s" 3 to xlerb" evaluate ;
T{ ' e-xlerb catch -> -13 }T
Proposal:
Append the following text to 3.3.1.2:
Neither the system nor programs shall create a definition with the name XLERB
, which is reserved for documentation and tests of well-known undefined definitions.
Append the following ambiguous condition to 4.1.2, after item 2:
- The definition name is
XLERB
.
Reference implementation:
empty
Testing:
T{ ' ' catch xlerb -> -13 }T
T{ s" xlerb" find-name -> 0 }T
: e-xlerb s" 3 to xlerb" evaluate ;
T{ ' e-xlerb catch -> -13 }T