Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!haven!umbc3!umbc5.umbc.edu!cs472226 From: cs472226@umbc5.umbc.edu (David Wood (CS472226)) Newsgroups: comp.lang.forth Subject: Re: Forth String Handling Words Keywords: Forth, Strings, Words Message-ID: <1880@umbc3.UMBC.EDU> Date: 7 Apr 89 12:18:12 GMT References: <8904040204.AA21175@jade.berkeley.edu> <1868@umbc3.UMBC.EDU> <183@isctsse.UUCP> Sender: newspost@umbc3.UMBC.EDU Reply-To: cs472226@umbc5.umbc.edu.UUCP (David Wood (CS472226)) Organization: University of Maryland Baltimore Co. Lines: 74 In article <183@isctsse.UUCP> brunjes@isctsse.UUCP (Roy Brunjes) writes: >In article <1868@umbc3.UMBC.EDU> cs472226@umbc5.umbc.edu.UUCP (David Wood (CS472226)) writes: >> (request for FORTH String-Handling words deleted) >> >> -David Wood > >I have written some words for working with strings (both counted strings >and null-terminated strings are supported) for the Amiga... > ...I would be glad to send them to anyone interested, but I >am unsure about how to best do that. I have never posted large files to >any newsgroup. This code may need to be modified to run under non-JForth >systems, so be ready for some of that. > >Roy Brunjes ...rochester!kodak!kadsma!brunjes > Absolutely I'm interested in seeing both sets of words. In fact, if you use both a length byte and null after, can't you access both types of string depending on what you send as an address? Since there's some concern, we ought to have a standard for placing FORTH code on here. May I suggest? (A moot question, since I'm going to anyway ;) ) 1. If the code is system-specific (makes ROM or specialized toolbox calls), the system for which it was designed and the make and model of the FORTH used to create it should be included as a header to the batch of screens. 2. The screens should be placed on UseNet with screen numbers and a total screen count ("Screen 1 of 4," "Screen 2 of 9," etc.). 3. Each line of the screen should be numbered from 1 to 16 (some systems may choke on a line 0). Blank lines should also be included. 4. Any non-standard words ought to be documented (explanations outside the above defined screen structure should be acceptable) or defined, and any words which make system calls should be clearly documented as to what they do (so either words can be written to patch it, or similar system calls can be used on other systems). As an example (TOTALLY NONFUNCTIONAL! Do Not Use...) System: APPLE IIGS+ FORTH: CrashFORTH v1.87 Screen 1 of 1 01> ( This is just a demonstration FORTH block. ) 02> : Zekto 2 + * ; 03> : Mnoga 45 16 ." Garter Snake" ; 04> : Kiplek Mnoga Zekto Drop ; 05> 06> 07> 08> 09> 10> 11> 12> 13> 14> 15> 16> It doesn't look like a really usable format at the moment, but if you write a FORTH program to read and strip off the headers, and then write the code into a proper block file, then you've got something. So the FORTH system in question (i.e. anyone) can read it, the System, FORTH, and Screen information ought to have standard tabs (May I suggest 3, 40, and 3, respectively?). The line numbers are used mainly as a checksum, so you and/or your system knows that some lines are missing and that compiling this code will likely result in disaster. The code itself should start writing at tab(4) and each line should run no longer than 64 characters (not including the line number, which won't be in the final block file). In fact, most lines shouldn't exceed 63 characters because some FORTHs handle the ends of lines funny. If anyone would care to distill this proposed standard for USENet FORTH code into something people can READ, please do so. I'd like to see what I wrote, too. :^) -David Wood Portal gets me into UseNet? Great! How do I get to Portal?