Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!husc6!rutgers!rochester!pt.cs.cmu.edu!a.gp.cs.cmu.edu!koopman From: koopman@a.gp.cs.cmu.edu (Philip Koopman) Newsgroups: comp.lang.forth Subject: Re: File handling tips Summary: text files are looking better these days Message-ID: <4576@pt.cs.cmu.edu> Date: 27 Mar 89 14:07:04 GMT References: <8903241905.AA06041@jade.berkeley.edu> <1270@hudson.acc.virginia.edu> Distribution: na Organization: Carnegie-Mellon University, CS/RI Lines: 44 In article <1270@hudson.acc.virginia.edu>, pmy@vivaldi.acc.Virginia.EDU (Pete Yadlowsky) writes: > A bit off the original topic, but the traditional block file system > is something I've always wondered about. I can't imagine why, today, > anyone would prefer numbered, fixed-record 'screens' over conventional > named files. This is not a flame, I'm just very curious. Would > some of you in the block camp care to comment on this? I'd > especially like to hear from those who have used both systems. I have used both blocks and text files. Blocks are handy because you can compile in small segments. Using a text editor block designate command such as Wordstar/Turbo Editor KB KK to do this is too tedious for me, and loses the natural segmentation of the program as well as the handy INDEX capability. But, blocks are really obnoxious on a hard disk because they waste so much space. A couple hundred K here, a couple hundred K there, and pretty soon you're talking real disk space! Also, if your word definition (especially an assembly language routine) doesn't fit in a few lines, you've got problems. Adding a block in the middle of a program is a pain, even with an EXPAND type word. I also find that blocks constrain my commenting (and no, shadow blocks don't do it for me -- they're either too small are too big, but never just right). Pure text files are a lose, because you give up a lot of the flexibility in debugging, and get back into long compile-test-edit cycles. However, there is one text file technique that I like a lot. I have seen elements of it in many places, but the first commercial system I ran across that did it in a really slick way was from Steve Pelc in England (Modular Programming Environment, or some such). Just add form-feed characters to a standard text file wherever you want to put a break in your code. Software can interpret the form feeds as variable-length block boundaries. Compiling individual blocks works, normal text editors can handle the files, INDEX works, and you save space (many text editors automatically use tab characters to reduce wasted space for indenting). And, copying the file to a printer produces a page break at every variable length screen boundary. Phil Koopman koopman@greyhound.ece.cmu.edu Arpanet 5551 Beacon St. Pittsburgh, PA 15217 PhD student at CMU and sometime consultant to Harris Semiconductor. --