Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!uwvax!astroatc!nicmad!madnix!rat From: rat@madnix.UUCP (David Douthitt) Newsgroups: comp.lang.forth Subject: Re: File handling tips Message-ID: <599@madnix.UUCP> Date: 9 Apr 89 19:17:45 GMT Reply-To: rat@madnix.UUCP (David Douthitt) Distribution: na Organization: ARP Software, Madison, WI Lines: 42 I wrote: | | Why not put the blocks into files? I believe that the Macintosh MacForth | does this - I know Mad Apple Forth does. | This way, everything still looks like blocks to the user, but can either | be a standard text file or an "all-text" file just like the blocks are. Lee Brotzman (ZMLEB@SCFVM.BITNET) replied: | I don't know about MacForth, but, in my experience, block-oriented Forth | systems that run under host operating systems usually implement blocks as | 1024-byte fixed-length records. There are no intervening end-of-line | characters or other record terminators. They are not at all like standard | text files, as evidenced by trying to print them and getting a run-on | mish-mash. I think you misunderstood me. As I see it, there are three possible formats here: 1. 1K Blocks, no filesystem 2. 1K Blocks stored as 1024-byte records in a file. 3. 1K Blocks stored as blocks of variable-length lines (that is, a block is made up of 16 variable-length text lines; does this sound like a text file? It should...) 4. Freeform "streaming" text file - no 1K limits. Personally, I think both versions #2 and #3 show promise for a file-based block system. For Apple Prodos, it's rather simple to read 16 lines terminated either at character 64 or at a newline. The only problem would be reading a text line with 64 characters and a newline character. Of course, that is not really a problem since Forth needs column 64 clear to keep the end of one line from connecting to the beginning of the next. The neat part is it would handle formats 2 and 3 above without change. What do you think? [david] -- ======== David Douthitt :::: Madison, WI :::: The Stainless Steel Rat ======== FidoNet: 1:121/2 ::::: WittiNet: "Curiouser and curiouser, said Alice." :::::: UseNet: ...{rutgers|ucbvax|harvard}!uwvax!astroatc!nicmad!madnix!rat ArpaNet: madnix!rat@cs.wisc.edu {decvax|att}!