Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!uunet!willett!dwp From: dwp@willett.UUCP (Doug Philips) Newsgroups: comp.lang.forth Subject: Re: Why is Postscript not Forth? Message-ID: <511.UUL1.3#5129@willett.UUCP> Date: 19 Feb 90 03:31:56 GMT References: <6876@tekgvs.LABS.TEK.COM> Organization: Latest link in the ForthNet chain. (Pgh, PA) Lines: 25 In <6876@tekgvs.LABS.TEK.COM>, toma@tekgvs.LABS.TEK.COM (Tom Almy) writes: > [Mitch Bradley's description of the advantages of addr/len strings.] > Well, I certainly agree. I wrote a string package in 1981 or 2 for Forth > that used only "adr len". I called these "string descriptors." There > were constant string descriptors and variable string descriptors (these > left *three* values on the stack-- address, physical length, and logical > length). The string package was very fast, easy to use, and protected > against string overflows. The only string packages I've seen that have > worked better, IMHO, are those associated with languages that do dynamic > memory allocation and garbage collection of strings (examples: Microsoft > BASIC, Lisp, SNOBOL, TRAC). This sounds almost identical to Simula-67's TEXT type. I don't have any Simula ref's on hand anymore, but the idea is almost exactly the same as your variable string descriptors. As I recall, in Simula-67, there might have been two addresses, one which always points to the beginning of the memory allocated for the string, and one which is the 'current' character pointer. Anyone out there have Simula manuals around? -Doug --- Preferred: willett!dwp@gateway.sei.cmu.edu OR ...!sei!willett!dwp Daily: ...!{uunet,nfsun}!willett!dwp [in a pinch: dwp@vega.fac.cs.cmu.edu]