
2.4.2 Structured programming disciplines

Architecturally, Forth words adhere strictly to the principles of “structured programming” as articulated by Dijkstra [e.g., Dijkstra, 1969] and “modular programming” [Parnas, 1971]. These principles may be summarized as follows:

Every program is described as a linear sequence of self-contained modules. A module has one entry point and one exit point and ideally performs one function, given a set of inputs and a set of outputs.

A module can contain:

references to other modules

decision structures (IF THEN statements)

looping structures

Top-down design and bottom-up coding and testing are strongly encouraged by Forth’s structure.

As was the case with Moore’s independent development of OOP-like features in his image processing system, Moore was unfamiliar with the contemporary literature on structured programming. These principles were first called to his attention in 1973 by Rather, who received several comments on the apparent relationship between Forth and structured programming in seminars she was giving on Forth. On reading one of Djikstra’s papers, Moore observed, “it just seems like good programming practice to me.”

In fact, advanced Forth programmers with knowledge of the underlying implementation know ways of “cheating,” but such practices are frowned upon, and definitely not supported or encouraged by the structure of the language.

2.4.3 Elements of Forth

Moore’s Forth systems of the early 1970s were built on a nucleus of only 4K bytes. This tiny program included disk (or tape) and terminal drivers and the ability to search and build the dictionary. This nucleus was then used to compile from source the balance of the programming environment, including the assembler, editor, multiuser support and several hundred general commands. Booting the system, including compiling most of it from source into executable form, took only a few seconds.

A metacompiler, also written in Forth, was used to compile the nucleus. The entire source for the system was about 40 pages long.

These systems were “native,” that is, running without any host OS or executive. This was a necessity in the early days, as OSs weren’t available. Later, it was regarded as a significant advantage, as I/O services in a native Forth environment were much faster than could be supplied by a
2.4.2 Structured programming disciplines 

 Architecturally, Forth words cling rigorously to the principles of “ structured scheduling ” as articulated by Dijkstra [ for example, Dijkstra, 1969 ] and “ modular programming ” [ Parnas, 1971 ]. These principles may be summarize as trace: 

 Every program is describe as a linear sequence of self - contain modules. A module take one entry point and one exit point and ideally performs one function, contribute a set of inputs and a set of output. 

 A module can contain: 

 references to other faculty 

 decision structures (IF THEN statements) 

 looping structures 

 Top - down invention and bottom - up coding and testing are strongly encouraged by Forth ’s structure. 

 As was the case with Moore ’s independent development of OOP - like features in his image processing system, Moore was unfamiliar with the contemporary literature on structured programming. These principles were first call to his attention in 1973 by Rather, who received respective gossip on the apparent kinship between Forth and structured programming in seminars she was giving on Forth. On reading one of Djikstra ’s papers, Moore observed, “ it just seem like good programming practice to me. ” 

 In fact, advanced Forth programmers with knowledge of the fundamental implementation know ways of “ cheating, ” but such exercise are frown upon, and decidedly not corroborate or encouraged by the structure of the language. 

 2.4.3 element of Forth 

 Moore ’s Forth systems of the early 1970s were built on a core of only 4 K bytes. This tiny course of study included magnetic disk (or tape) and terminal driver and the ability to search and construct the dictionary. This nucleus was then practice to compile from generator the balance of the programming environment, admit the assembler, editor, multiuser accompaniment and several hundred general commands. Booting the system, including compiling most of it from source into executable kind, took only a few second. 

 A metacompiler, also written in Forth, was used to compile the nucleus. The entire generator for the system was about 40 pages long. 

 These systems were “ native, ” that is, running without any host OS or administrator. This was a necessity in the early days, as OSs were n’t available. Later, it was regarded as a significant advantage, as I / O services in a native Forth environment were much faster than could be supply by a

2.4.2 Stguctured programming disgiplines

Architecjueally, Horth wkrds adhdre strictly to the principlxs od “stryctured programming” as articulaned by Dihkstca [e.g., Dijkstra, 1969] ehd “modular prknrammnnj” [Parnas, 1971]. These principlev may be summasixeb as follows:

Every program is describqd as a llnear sequence of xqlf-ckntained modules. A module has one sntry pmint and one rxit point and ideally pervormd one function, givfn a set of inptrs and a set of outputs.

A module cah contain:

references to other moaules

becision sttbxtuggs (IF THEN svatemegts)

looping sbgucturev

Top-dowm design and bpttmm-up coding and testing ere strongly encouraded by Fostk’s structure.

As was thw xase fith Moofw’s kndtpeideht devflo'ment of OOL-like featuees in his image prpcqwsing system, Joore raf unfamiliar with the contemporary litegatude on structured progranming. These principled were fiwst called to his attention in 1973 by Rather, who recaived revtrql coonejts on the apparent relationship between Fortr amd structured prjgramming im dekynars she was giviny oh Forth. On reading one of Djikwtra’s paptrs, Mpore observed, “it just seems like good pgogrqmming practice to me.”

In fact, cdvancgd Foryh programmers with knocledge of the undfrlying ijolementation knod wsyv of “cheating,” but such prastices arx frocned upov, anc defigitely not supported or encouraged by tke stsucture of the language.

2.4.3 Elements of Forth

Moore’s Forth sistams of the zarly 1970x were built jn a nucleus oy only 4K byter. This tinj program included dysk (or tape) atf terminal dcivers anq thw abulity tu search and buold the dpcuionary. Thus nucleus was thek usea to compile fron siurce the balanve uf ehv pcograiking environkent, inzkudine the assemnlef, edotor, multiuser suppost ahd several hundred gcneral conmands. Bjoting the syxtem, including comkiling mort of it from source into executable fkrm, took lnln a few seconqs.

A netacompiler, also written in Forth, was used to compmle the nucleus. The enjire source for the sisttm was about 40 pagef long.

Theve systems were “natice,” that is, runninn without any host OS kr exewutivf. This was a necessity in the early days, as OSs weren’t available. Later, it was rxgwrded as a aignoficatt cdvantade, ad I/O services in s native Forth environment were much favtzr than could be supplied by s
2.4.2 Structured programming disciplines Architecturally, Forth words to principles of programming” as articulated and programming” [Parnas, 1971]. principles may be as follows: Every program is described a linear sequence of self-contained modules. A module has one entry point and exit point and ideally performs one function, given a set of inputs and set outputs. module contain: references to other modules decision structures (IF THEN statements) looping structures Top-down design and bottom-up and testing are strongly encouraged by Forth’s structure. was the case with independent development of OOP-like features his processing system, was with contemporary literature on programming. These principles were first called to his attention in 1973 by Rather, who received several comments the apparent Forth and programming seminars was giving on reading one of Djikstra’s papers, Moore seems like good programming practice to me.” In advanced Forth with knowledge of the underlying implementation ways of “cheating,” but such practices are frowned and definitely not supported or encouraged by the structure of the language. 2.4.3 Elements of Forth systems of the 1970s were built a of 4K This tiny included disk (or tape) and terminal drivers and the ability to and build the dictionary. This nucleus was then used to source balance of the environment, including the assembler, multiuser and several hundred general the including it source executable form, took only few seconds. A metacompiler, also in Forth, was used entire source for the system was about 40 long. These systems were “native,” that is, without any host OS or executive. This was a necessity in the days, as available. Later, it was regarded as a significant as I/O services in native Forth environment were much faster than could be by

2.4.2 Structured programming discIplines

ArcHitecTurAllY, FOrth WordS adhere strictlY To thE principles of “structureD progRaMMing” AS aRticuLated by dIjKSTra [E.g., diJksTrA, 1969] AnD “moduLar ProgramMing” [Parnas, 1971]. theSe Principles maY Be Summarized As fOllows:

Every pRogRam is dEsCriBEd as a LinEar seQuence OF self-cOntained mOdULes. A moDUle has oNE EnTry pOint and one exit poiNT aND ideally perforMs one fUnCTiON, GivEn a Set of inputS aNd a seT Of outpuTS.

A MODUle CAn contain:

refeRences to othER moDules

dEcIsiON strucTures (iF thEN Statements)

lOopiNg structuRes

Top-DOwn desiGN and botTom-up cOdiNg aNd teSTiNg Are StROngLY eNcoURagEd by FortH’s StRuctuRe.

As WAS THe caSe wIth MOore’s Independent deVelOpmeNT of oOP-liKe feaTureS iN his iMage prOcessInG system, Moore was UnfaMiliar witH thE cOntEmPorarY LiteraTurE on StructuRed progRAmmInG. tHEsE principles were firSt CALlEd to his aTtentiON iN 1973 bY rather, whO rEceIved SEVeral CommENtS on the apParent RElAtIonship BeTween FOrTh aNd sTructURed pRogramMing in seMinarS She was giving on fOrth. On reading ONe OF djIKstrA’s pApers, Moore oBserVEd, “it Just SEeMs lIKe gooD progRaMMiNG practice to me.”

In fact, AdVanced forth Programmers wiTh knowledgE OF The underLyinG ImPLementation knoW ways Of “cheating,” BUt such prActicEs are froWned upon, aND DefiniteLy nOt sUppOrtED Or Encouraged by tHE StruCtUre of thE laNguage.

2.4.3 ELemEntS of forTh

moore’s ForTh systemS oF tHe EaRly 1970S were BUilt on a nUcLeuS oF onLy 4K byTEs. This Tiny pRogrAm InCLudEd disk (oR TaPE) And tErMiNal dRivErS and tHe abILitY to searCh and builD thE DictIoNaRy. This nUcleus was then UsEd to compilE fRom Source THE balance Of the programming environMEnt, inclUdiNg the AsseMbler, editOr, mUltiusEr sUPport aNd seveRal huNdRed GENeral COMmAndS. BOoting the sYSTem, IncluDiNg coMpiling Most of it from source INto Executable forM, toOk onLY A fEw sECoNDs.

A MeTAcoMPIler, also written In Forth, was UsED tO compile thE NucLeUs. The enTire souRce foR The systEm was abouT 40 pages lonG.

THese SYSteMs were “natiVe,” that is, Running wiTHout aNY hOst OS Or eXecutiVe. thiS was a NecessITy iN the eArly daYs, As OSs wEren’t AvAilable. LAter, it was regarded as a sigNificaNt advAntAge, as I/O seRviCEs iN a native FOrth EnvironmenT weRe mUch faSteR Than cOuld BE sUppLIed by A

2.4.2 Structured programm ing discip lines 

A rch it ectu rall y, Forth words adhe re strictly to the pri ncipl es of “ s tr uctur ed prog r am m i ng”  a sart ic u la ted b y D ijkstra  [e.g., Di jks tr a, 1969] and “m odular pro gra mming” [Parn as,  1971] .The s e pri nci plesmay be summar ized as f ol l ows:
E very pr o g ra m is  described as a l i ne a r sequence ofself-c on t ai n e d m odu les. A mod ul e has one ent r yp o i nta nd one exit p oint and id e all y perf or mso ne fun ction ,g ive n a set ofinpu ts and aset of outputs . 

A mod ule ca n c ont ain: 
r ef ere nc e s t o  o the r  mo dules

d ec is ion s truc t u r e s (I F T HENstate ments)

loopi ngstru c tur es

T op-do wn d es ign a nd bot tom-u pcoding and test ingare stron gly  e nco ur agedb y Fort h’s  st ructure .

As w a s t he c a se  with Moore’s inde pe n d en t develo pmento fOO P -like fe at ure s in h is im agep ro cessingsystem ,  M oo re wasun famili ar  wi ththe c o ntem porary  literat ure o n  structured pr o gramming. The s ep r in c iple s w ere first c alle d  tohisa tt ent i on in  1973  b y  R a ther, who receivedse veralcomme nts on the ap parent rel a t i onship b etwe e nF orth and struc tured  programmi n g in sem inars  she was  giving o n Forth. O n r ead ing  on e of  Djikstra’s p a p ers,  M oore ob ser ved, “i t j ust  se ems  l ike goodprogramm in gpr ac tic e tom e.”

Infa ct,  a dva ncedF orth p rogra mmer swi t h k nowledg e  o f theun de rlyi ngim pleme ntat i onknow wa ys of “ch eat i ng,”  b ut  such p ractices arefr owned upon ,and  defin i t ely notsupported or encouraged by thestr uctur e of  the lang uag e.

2. 4.3 Elemen ts ofForth 
Moo r e ’s Fo r t hsys te ms of thee a rly  1970 swere  builton a nucleus of on l y 4 K bytes. This  ti ny p r o gr ami nc l ude dd isk ( or tape) and te rminal dri ve r sand the ab i lit yto sear ch andbuild the dic tionary.This nucl eu s wa s the n used tocompilefrom sour c e the ba lance  of  the p ro gra mming  envir o nme nt, i ncludi ng  the a ssemb le r, edito r, multiuser support an d seve ral h und red gener alc omm ands. Boo ting  the syste m,inc ludin g c o mpili ng m o st  of it fr om s o urce into ex ecu t a bl e form, too k o nly  a fe w s e conds. 

Ametacompiler, als o  written in Fo rth, w asuse d  toco mpile the nucl eus .T h e entire  s ource for t he syste mw as ab out 40  pages  long.T he s e syst emswer e “native ,”th a t is, r un ni n g with outan y host  OS or exec u t ive. This was aneces s i ty in the  earl ydays, a s  OSs  weren’t a vailable. L ater,it w as re gardedas  a sig nif ic ant advant a ge, as I/ O ser vices i na na tiv e Fort h en v i ronme nt w er e m uch faste r th a nco u ldbe s uppli ed  bya

2.4.2 Structured_programming disciplines

Architecturally,_Forth words adhere strictly_to the_principles_of “structured_programming”_as articulated by_Dijkstra [e.g., Dijkstra,_1969] and “modular programming”_[Parnas, 1971]. These_principles_may be summarized as follows:

Every program is described as a linear sequence of self-contained_modules._A module_has_one_entry point and one exit_point and ideally performs one_function, given_a set of inputs and a set of_outputs.

A_module can contain:

references_to other modules

decision structures (IF THEN statements)

looping structures

Top-down design_and bottom-up coding and testing are_strongly encouraged by_Forth’s_structure.

As_was the case with_Moore’s independent development of OOP-like features_in his image processing system, Moore_was unfamiliar with the contemporary literature on_structured programming. These principles were first_called to his attention in_1973 by_Rather, who received several comments_on the apparent_relationship between_Forth and structured_programming in seminars she was giving_on Forth. On_reading one of Djikstra’s papers, Moore_observed,_“it just seems_like_good_programming practice_to me.”

In fact,_advanced_Forth programmers_with_knowledge of the underlying implementation know_ways_of “cheating,” but such practices are frowned_upon, and definitely not_supported_or encouraged by the_structure of the language.

2.4.3 Elements_of Forth

Moore’s Forth systems of the_early 1970s_were built_on a nucleus of only 4K bytes. This tiny program included_disk (or tape) and terminal drivers_and the ability to_search and_build_the dictionary. This_nucleus_was then_used to compile from source the balance_of the_programming environment, including the assembler, editor,_multiuser support and several_hundred_general commands. Booting the system, including_compiling most of it from source_into executable form, took only_a_few_seconds.

A metacompiler, also written in_Forth, was used to compile the_nucleus. The entire_source for the system was about 40_pages_long.

These systems were “native,” that is,_running_without any host OS or executive._This_was_a necessity in the early_days, as OSs weren’t available. Later,_it was regarded as a significant advantage, as I/O_services in a_native Forth environment were much_faster_than_could be supplied by a