gimpelsolution

Cfr. J.F.Gimpel (1976) 11-17. As a solution, Gimpel describes a simple and efficient method for structured functional program design in SNOBOL4 that has come to be known as „hop-around convention“ (Gimpel, 17-21). Since this method introduces one additional label and a Goto per function to make sure its DEFINE() statement is executed without running through the function body, this convention, although practically useful and flexible, has the disadvantage of incurring a memory overhead, which is the larger, the more functions a program defines. To eliminate this overhead in a system as large as V&F, we have adopted a strategy that is similar to what C programmer do normally: For any single function there are two files, one containing the function code itself and a second file with the defining statement and all initializations that might be necessary. All these header files are -INCLUDEd by one file which in turn is – INCLUDEd by the main program and whose statements are executed when the program comes up. All files with function code are -INCLUDEd by another file, which contains one large hop-around command to transfer control from before all function bodies to the first statement after all the functions. Thus, the memory overhead is reduced to one single Goto and one additional label. For further reading on SNOBOL4/SPITBOL refer to S.Hockey (1985); E.Johnson (6.ed., 1995); R.E.Griswold & J.F.Poage & I.P.Polonsky (1970); R.E.Griswold & M.T.Griswold (1973); M.Emmer (1985); M.Emmer (1989); W.W.Peterson (1974) ch. 9.

HSU

Letzte Änderung: 20. März 2018