Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!apple!motcsd!hpda!hpcuhb!hpcllla!hpclisp!chip From: chip@hpclisp.HP.COM (Chip Chapin) Newsgroups: comp.lang.pascal Subject: Re: Strings in Pascal (was standard pascal) Message-ID: <950027@hpclisp.HP.COM> Date: 3 Jul 89 20:13:47 GMT References: <7716@spool.cs.wisc.edu> Organization: Hewlett-Packard Calif. Language Lab Lines: 39 / ags@mentor.cc.purdue.edu (Dave Seaman) / 12:38 pm Jun 29, 1989 / In article <7716@spool.cs.wisc.edu> neves@ai.cs.wisc.edu (David M. Neves) writes: >>In article <3182@mentor.cc.purdue.edu> ags@mentor.cc.purdue.edu (Dave Seaman) writes: >>I have a related question. When people talk about Pascal-style >>strings they describe the string type as it exists in UCSD/Turbo >>Pascal where the length is kept in the first byte/word of the string. >>Did UCSD invent this string representation? I have been told that >>strings are not a part of ANSI Pascal. Are they a part of any other >>standard or extended standard? > >"Pascal-style" strings with the length kept in the first byte are indeed not a >part of ANSI Pascal (or ISO, or J&W). I don't know who did it first, but two >of the early entries were PASCAL/Z (for Z-80 systems) and UCSD Pascal. A UCSD was definitely before Pascal/Z. The UCSD string representation was in use at least a year before the release in 1977 of UCSD Pascal for the PDP-11 (shortly followed by the Z80/8080 release). I don't remember seeing any other Z80 or 8080 Pascals until Mike Lehman's Pascal-MT+ in 1979 or 1980. I think Pascal/Z followed Pascal-MT+, but I can't be sure. > ... >None of this should be confused with conformant arrays (ISO standard, level 1), >which is another matter altogether. Interestingly, Oregon Software's current Pascal-2 implementation seems to implement UCSD-style strings entirely within the standard Pascal language by using conformant arrays. Of course conformant arrays weren't available at UCSD in 1977... Chip "UCSD '78" Chapin ------------------------------------------------------------- Chip Chapin -- HP Computer Language Lab uucp: ... {allegra,decvax,ihnp4,ucbvax} !hplabs!hpda!chip or ... chip%hpda@hplabs.hp.com HPDesk: chip (hpda) /HPUNIX/UX USMail: 47LZ; 19420 Homestead Ave; Cupertino, CA 95014 Phone: 408/447-5735 HPTelnet: 1-447-5735 -------------------------------------------------------------