Path: utzoo!censor!geac!maccs!innovus!rob From: rob@innovus.UUCP (Rob Sciuk) Newsgroups: comp.lang.forth Subject: Re: Blocks VS Text a compromise Message-ID: <238@innovus.UUCP> Date: 19 Oct 90 19:06:36 GMT References: <9010151631.AA11190@ucbvax.Berkeley.EDU> <21231@well.sf.ca.us> Reply-To: rob@innovus.UUCP (Rob Sciuk) Organization: Innovus Inc, Hamilton, Ont. Canada Lines: 68 In article <21231@well.sf.ca.us> jax@well.sf.ca.us (Jack J. Woehr) writes: >ZMLEB@SCFVM.GSFC.NASA.GOV (Lee Brotzman) writes: > > ... stuff ... > >>any one time, and with block files I could just as easily edit a 5-block file >>as a 100-block file. Of course, on larger systems -- even PCs -- this is >>less of a consideration. > > Amen, Bro. Lee ... also, BLOCK files are the *only* truly universally >portable file format in existence! I read Forth screens intended for ANY system >with ANY of the twenty or so Forths that I use with no conversion. > > ... stuff ... Yet another fool ... into the breach ... (not them -- me!) WHY COMPROMISE? HAVE BOTH!!! Yes, I have yet another homebrew implementation written in C, and designed to be HOSTED UNDER ANY OPERATING SYSTEM. Currently it runs under DOS, Un*x, MPE V, and MPE XL on a number of different hardware architectures. It is desirable to be able to READ/WRITE/COMPILE/EDIT the operating system's favourite file types whether they are fixed length, variable length, terminated etc etc. BLOCK files are indispensible for writing portable DBMS applications, memory extensions and all the neat things that a proper BLOCK file implementation allows: Forth-83 words: BLOCK, BUFFER, UPDATE, SAVE-BUFFERS, FLUSH in addition non standard words: CREATE-FILE ( strptr len --- fptr ) OPEN-FILE ( strptr len --- fptr ) ASSIGN-FILE ( fptr --- ) WHICH-FILE ( --- fptr ) DELETE-FILE ( fptr --- ) CLOSE-FILE ( fptr --- ) which allow access to block files. Further, just three words allow use of C stream files as implemented in the environment: LOAD ( strptr len --- ) a non-standard word which redirects standard input from the file named in the quoted string on an input file stack N files deep. (eg: " myfile" LOAD ) My apologies to the purists who do not like non-standard WORDS, but its MY Forth, and I'll implement what I like! OUT ( strptr len --- ) a non-standard word which redirects standard output to the file named in the quoted string and pushes the file onto an output file stack N files deep. eg: " myfile" OUT NOOUT ( --- ) closes the current output file and pops the file stack. Thus I use text files for compiling, and editing source code with the system editor, and BLOCK files for use within applications. IMHO a flexible and rational combination of the two methods FOR THOSE SYSTEMS WHICH RUN UNDER A HOST OPERATING SYSTEM. rss.