Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!rochester!rutgers!att!ulysses!andante!alice!dmr From: dmr@alice.UUCP Newsgroups: comp.arch Subject: Re: String lengths Message-ID: <8882@alice.UUCP> Date: 7 Feb 89 07:57:35 GMT Organization: AT&T Bell Laboratories, Murray Hill NJ Lines: 24 Robert Firth justifiably corrects my misstatement about BCPL strings; they were indeed counted. I evidently edited my memory. Perhaps he or someone else can discuss authoritatively how they fitted into the language and (to recall the original topic) how string instructions might help in processing. More nearly correct memory--which applies only to 20-year-old implementations on the IBM 7090 and GE 635/645--says that strings existed in two forms: a one-byte count followed by the characters of the string, and an expanded form in which the count and the characters were blown out into words. In these implementations, bytes were 9 bits, and so the compact representation limited strings to length 511. On the other hand, the blown-out form occupied lots of space and wasn't suitable for transferring directly to text files. Originally, I believe, there were no operators for accessing individual characters in a compact string, though they were added later. Dennis Ritchie att!research!dmr dmr@research.att.com