Sujet : Re: THROW codes and ambiguous conditions
De : sjack (at) *nospam* dontemail.me (sjack)
Groupes : comp.lang.forthDate : 03. Jun 2025, 21:48:40
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <101nn38$8p8m$1@dont-email.me>
References : 1 2 3
User-Agent : tin/2.6.4-20240224 ("Banff") (Linux/6.8.0-60-generic (x86_64))
dxf <
dxforth@gmail.com> wrote:
MS-DOS errors are mapped to 'ior' using $FExx (CHForth trick)
At one time I had catch/throw integrated with FigForth ERROR (was
workable but hard to explain). Any system error (negative IOR)
would throw a system ERROR code and would provide the IOR as data.
Catch caught the ERROR code (positive number) and could key off the
IOR code for any action it would want to take. Of course this doesn't
address portability issue as to standard code and standard response.
Also had file of Linux error code descriptions to view with external
resource, no impact on Forth. Seldom made use of it. For savvy users
an error code alone suffice as to error cause e.g. 'fail to open a
non-existing file, most likely a typo in the file path'. I don't
discount an astronaut landing on the moon being highly concerned by
streaming printouts of 1202 and 1201 codes. Streaming text wouldn't
had been any better because the astronauts hadn't been 'trained' for
that situation. (Somewhat similar, drilling rig tips over in North Sea
because tool-pusher couldn't comprehend the manual instructions in
time to fix stabilizers). Instructions provide the illusion of
being taken care of and is often championed by marketing, activists and
other puffer fish wanting to maintain a middle man position. I admit not
all is so nefarious though I smile sometimes to see who is pushing what.
Me, I'm 'Tool-Time' by nature. Give me a bigger hammer and I'll fix
it, or break it. X-wife on the other hand, a very intelligent retired
teacher, is big on instructions. She hopeless in operating a smart
phone. If instructions fail to give wanted results, mouth is quick to
engage. Not a moment is given to 'thinking' what could possibly have
gone wrong. Wouldn't do any good anyways; she has very little to work
with. Now despite what some shallow-minded feminist will happily
construe, I'm not being mean. It's a fact thinking requires some
basic concepts to work with. If such were not accrued for whatever
reason, then whining is the only recourse for the moment.
Unfortunately, the epiphany never occurs that now would be a good time
to start rectifying that problem.
-- me'The Sleep of Reason Produces Monsters' -- Goya