Sujet : Re: Why dial-a-standard is not a thing in Forth
De : sjack (at) *nospam* dontemail.me (sjack)
Groupes : comp.lang.forthDate : 23. Apr 2025, 15:22:28
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vuat34$39mtc$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11
User-Agent : tin/2.6.4-20240224 ("Banff") (Linux/6.8.0-58-generic (x86_64))
mhx <
mhx@iae.nl> wrote:
Why not store the number as text in this case?
What is the advantage? As a user I still need
to know the BASE (unless it is assumed to be
always 10).
CVD is not for user to switch base when he intends so.
Its an aid for the user when doing operation like LIST or
LOAD where he enters screen number intended to be in decimal
but unbeknownst the BASE was not decimal.
' list see
LIST
134542736 CVD
134542740 LIST
134542744 ;S
' load see
LOAD
134542764 CVD
134542768 LOAD
134542772 ;S
..CURRENT and CONTEXT are WRK BASE: 10 Latest:
S?: empty
0 101 .line This is indeed screen 101 (decimal)
2 base !
..CURRENT and CONTEXT are WRK BASE: 2 Latest:
S?: empty
101 list
SCR # 101
0 This is indeed screen 101 (decimal)
1
--- Snip ---
14
15
..CURRENT and CONTEXT are WRK BASE: 10 Latest:
S?: empty
The user got the intended screen listing, #101 (decimal)
due to CVD .
Added bonus, the original LIST set the BASE back to decimal.
Not fool proof for LOAD. At least the correct screen is loaded
but if the base is not set in the screen it could be a problem
but usually will be noticeable. And if not, "c'est la vie".
-- me