Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #135057
| Date | 2026-05-03 23:09 +1000 |
|---|---|
| Subject | Re: The joy of formatting |
| Newsgroups | comp.lang.forth |
| References | (2 earlier) <nnd$5188275e$5d740caa@15d7ec6ab0bb7dfb> <69f36016$1@news.ausics.net> <nnd$36020a68$7d940848@8c5641d01ac9a818> <69f3ec53$1@news.ausics.net> <2026May1.080355@mips.complang.tuwien.ac.at> |
| From | dxf <dxforth@gmail.com> |
| Message-ID | <69f74911@news.ausics.net> (permalink) |
| Organization | Ausics - https://newsgroups.ausics.net |
On 1/05/2026 4:03 pm, Anton Ertl wrote: > dxf <dxforth@gmail.com> writes: >>From a Gforth include: >> >> : pn ( n -- ) 0 <# # # #> type ; >> : ;pn [char] ; emit pn ; >> : ESC[ 27 emit [char] [ emit ; >> : at-xy 1+ 1 under+ ESC[ pn ;pn [char] H emit ; > > Here's another one (the one active when I invoke Gforth): > > : #n ( n -- ) [: 0 #s 2drop ;] #10 base-execute ; > : #n; ( n -- ) #n ';' hold ; > : #esc[ ( -- ) > s\" \e[" holds ; > > : vt100-at-xy ( u1 u2 -- ) > 1+ swap 1+ <<# 'H' hold #n; #n #esc[ #0. #> type #>> ; > > Benefits: > > 1) Works also as intended when invoked while BASE is not decimal > (BASE-EXECUTE). > > 2) Does not disturb any ongoing hold buffer usage (<<# ... #>>). > > 3) Stack effect comments. IIRC the standard makes no mention of what needs preserving. Some implementations preserve BASE; while others don't. Here you preserve the HOLD buffer as well.
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar
The joy of formatting albert@spenarnc.xs4all.nl - 2026-04-29 15:41 +0200
Re: The joy of formatting dxf <dxforth@gmail.com> - 2026-04-30 12:11 +1000
Re: The joy of formatting Hans Bezemer <the.beez.speaks@gmail.com> - 2026-04-30 09:48 +0200
Re: The joy of formatting albert@spenarnc.xs4all.nl - 2026-04-30 11:06 +0200
Re: The joy of formatting Hans Bezemer <the.beez.speaks@gmail.com> - 2026-04-30 23:34 +0200
Re: The joy of formatting albert@spenarnc.xs4all.nl - 2026-04-30 11:11 +0200
Re: The joy of formatting dxf <dxforth@gmail.com> - 2026-04-30 23:58 +1000
Re: The joy of formatting albert@spenarnc.xs4all.nl - 2026-04-30 18:11 +0200
Re: The joy of formatting dxf <dxforth@gmail.com> - 2026-05-01 09:57 +1000
Re: The joy of formatting anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-05-01 06:03 +0000
Re: The joy of formatting dxf <dxforth@gmail.com> - 2026-05-03 23:09 +1000
Re: The joy of formatting anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-05-03 14:11 +0000
Re: The joy of formatting dxf <dxforth@gmail.com> - 2026-05-04 11:02 +1000
Re: The joy of formatting minforth <minforth@gmx.net> - 2026-04-30 20:47 +0200
Re: The joy of formatting Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-05-03 09:07 -0500
csiph-web