Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!purdue!mentor.cc.purdue.edu!ags From: ags@mentor.cc.purdue.edu (Dave Seaman) Newsgroups: comp.lang.pascal Subject: Re: Strings in Pascal (was standard pascal) Message-ID: <3188@mentor.cc.purdue.edu> Date: 29 Jun 89 19:38:58 GMT References: <20139@adm.BRL.MIL> <2044@hub.ucsb.edu> <3182@mentor.cc.purdue.edu> <7716@spool.cs.wisc.edu> Reply-To: ags@mentor.cc.purdue.edu (Dave Seaman) Organization: Purdue University Lines: 18 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 similar method (with slightly different syntax) was and is used by IBM in their Pascal/VS (a forerunner of today's VS Pascal) on mainframes. The idea has caught on and is now included in most microcomputer implementations of Pascal. None of this should be confused with conformant arrays (ISO standard, level 1), which is another matter altogether.