🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.forth
Article #171

Re: Why FORTH screens?

#171
From: M.Fischer
Date: Sat, 23 Mar 1985 19:08
30 lines
2072 bytes
There is some truth to the suggestion that it maintains compatability,
but there are more important reasons for having screens.
After many years of FORTH programming, I suggest the ideal format for
storing FORTH source code would be by definition.  The least ideal
format is to have a particular set of source definitions all collected
into one file with no partitions.  I have tried both (and many others),
and still end up with screens in the end.
I think this is a consequence of the way I use FORTH.  FORTH definitions
are very transportable between applications.  Just load it in, no linking
etc.  Because of this, screens typically have one or two related definitions
with perhaps a constant or even a variable.  If the application is a
collection of source definitions it is more difficult to hunt down and
find what you are looking for, and extract it for further use.  Also 
noteworthy is that FORTH is often used where disk resources are small
and slow.  By the way, the following is a handy way to keep track of
the source block a particular word is located in, although it uses
two bytes per definition.

( Redefine :)
: : BLK @ , [COMPILE] : ; IMMEDIATE

( BLK? aaaa .... block number)
: BLK? -FIND 0= 0 ?ERROR DROP NFA 2 - @ ( Convert to SCR#) B/SCR / ;

( WLIST aaaa     lists screen with aaaa source)
: WLIST BLK? LIST ;

These could be extended to CODE VARIABLE etc.

Michael Fischer  mf1@ukc
Technical Details
Message-ID: <5008@ukc.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!mcvax!ukc!mf1
References: <7349@watrose.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 5/3/83; site ukc.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!mcvax!ukc!mf1
From: mf1@ukc.UUCP (M.Fischer)
Newsgroups: net.lang.forth
Subject: Re: Why FORTH screens?
Message-ID: <5008@ukc.UUCP>
Date: Sat, 23-Mar-85 14:08:56 EST
Article-I.D.: ukc.5008
Posted: Sat Mar 23 14:08:56 1985
Date-Received: Wed, 27-Mar-85 04:09:58 EST
References: <7349@watrose.UUCP>
Reply-To: mf1@ukc.UUCP (Michael Fischer)
Organization: Computing Laboratory, U of Kent at Canterbury, UK
Lines: 30