Re: Back & Forth - 4tH I/O and You

Liste des GroupesRevenir à cl forth 
Sujet : Re: Back & Forth - 4tH I/O and You
De : albert (at) *nospam* spenarnc.xs4all.nl
Groupes : comp.lang.forth
Date : 19. May 2025, 10:55:32
Autres entêtes
Organisation : KPN B.V.
Message-ID : <nnd$275d8c6f$664d1957@ad6fed0bbc602837>
References : 1 2 3 4
User-Agent : trn 4.0-test77 (Sep 1, 2010)
In article <078ff0e4ae28526fe1c04fef6474326237ad928d@i2pn2.org>,
dxf  <dxforth@gmail.com> wrote:
On 19/05/2025 2:49 am, Hans Bezemer wrote:
...
Second - I've consulted my script, and nowhere do I use the word "redirection". I *do* state, however: "That means I have to *reuse* as many tokens as possible."
>
What I mean is: why should I change my source to:
>
S>D <# #S ROT SIGN #> fid WRITE-FILE
>
When I can continue to use a perfectly capable: .
>
In my case that would be:  (.) WRITE
>
where (.) is a kernel function and WRITE is a library function with
appropriate error handling:
>
123 (.) write  invalid handle error ... aborting
>
Using that library I could define DISK as mentioned previously and do:
>
DISK 123 . CONSOLE
>
but as any exception msg would go to the file, redirection seems more
trouble than worth.
>

Huh? Redirection is not what you do in your program. It is outside
in the OS. It requires only avoiding silly design choices in
your Forth such as channeling all output through a one character
at a time function as a revectorable EMIT.
If you try to redirect via revectoring EMIT, you have already lost.

Groetjes Albert
--
Temu exploits Christians: (Disclaimer, only 10 apostles)
Last Supper Acrylic Suncatcher - 15Cm Round Stained Glass- Style Wall
Art For Home, Office And Garden Decor - Perfect For Windows, Bars,
And Gifts For Friends Family And Colleagues.

Date Sujet#  Auteur
17 May 25 * Back & Forth - 4tH I/O and You13Hans Bezemer
18 May 25 +* Re: Back & Forth - 4tH I/O and You11dxf
18 May 25 i+* Re: Back & Forth - 4tH I/O and You2mhx
19 May 25 ii`- Re: Back & Forth - 4tH I/O and You1mhx
19 May 25 i`* Re: Back & Forth - 4tH I/O and You8dxf
19 May 25 i +- Re: Back & Forth - 4tH I/O and You1dxf
19 May 25 i +- Re: Back & Forth - 4tH I/O and You1albert
19 May 25 i `* Re: Back & Forth - 4tH I/O and You5dxf
20 May 25 i  `* Re: Back & Forth - 4tH I/O and You4dxf
20 May 25 i   +* Re: Back & Forth - 4tH I/O and You2albert
21 May 25 i   i`- Re: Back & Forth - 4tH I/O and You1dxf
22 May 25 i   `- Re: Back & Forth - 4tH I/O and You1dxf
20 May 25 `- EOC [Re: Back & Forth - 4tH I/O and You]1Buzz McCool

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal