Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #3067
| From | Martin Ward <martin@gkc.org.uk> |
|---|---|
| Newsgroups | comp.compilers |
| Subject | Re: counted characters in strings |
| Date | 2022-06-11 10:52 +0100 |
| Organization | Compilers Central |
| Message-ID | <22-06-035@comp.compilers> (permalink) |
| References | (4 earlier) <22-06-015@comp.compilers> <22-06-019@comp.compilers> <22-06-021@comp.compilers> <22-06-025@comp.compilers> <22-06-029@comp.compilers> |
On 10/06/2022 03:21, Robin Vowels wrote: > Nevertheless, counting the number of characters was a constant source > of error. It was easy enough to include the letter 'H' in the > character count, sp that the following character became gobbled up in > the Hollerith constant, and resulting in weird error messages. When a > Hollerith constant was long enough to require a continuation card, it > was even easier to lose count; the continuation character in column > 6 sometimes being included. And when the Hollerith constant required > 133 characters, how many coud reliably count all of them? The point about coding forms was that each column of characters was numbered, so you just had to take the first column and the last and compute last - first + 1 to get the number of characters in the string. You don't have to count each one individually. If there is a continuation then you just compute last + 66 - first + 1 For 133 characters, there would be two continuation cards and the last column would be the same as the first: so quite easy to count reliably in fact! Back in the days before pocket calculators, many people could do simple arithmetic sums in their heads! :-) -- Martin Dr Martin Ward | Email: martin@gkc.org.uk | http://www.gkc.org.uk G.K.Chesterton site: http://www.gkc.org.uk/gkc | Erdos number: 4
Back to comp.compilers | Previous | Next — Previous in thread | Next in thread | Find similar
State-of-the-art algorithms for lexical analysis? Roger L Costello <costello@mitre.org> - 2022-06-05 20:53 +0000
Re: State-of-the-art algorithms for lexical analysis? gah4 <gah4@u.washington.edu> - 2022-06-05 16:05 -0700
Re: State-of-the-art algorithms for lexical analysis? Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2022-06-06 08:59 +0200
State-of-the-art algorithms for lexical analysis? Christopher F Clark <christopher.f.clark@compiler-resources.com> - 2022-06-06 21:16 +0300
Re: State-of-the-art algorithms for lexical analysis? Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2022-06-07 06:52 +0200
Re: State-of-the-art algorithms for lexical analysis? Christopher F Clark <christopher.f.clark@compiler-resources.com> - 2022-06-07 19:40 +0300
Re: State-of-the-art algorithms for lexical analysis? Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2022-06-08 05:32 +0200
Re: counted strings, was State-of-the-art algorithms for lexical analysis? gah4 <gah4@u.washington.edu> - 2022-06-09 11:54 -0700
Re: counted characters in strings "Robin Vowels" <robin51@dodo.com.au> - 2022-06-10 12:21 +1000
Re: counted characters in strings Martin Ward <martin@gkc.org.uk> - 2022-06-11 10:52 +0100
Re: counted characters in strings drb@msu.edu (Dennis Boone) - 2022-06-11 11:09 -0500
Re: State-of-the-art algorithms for lexical analysis? Kaz Kylheku <480-992-1380@kylheku.com> - 2022-06-06 16:00 +0000
References for PSL ? Christopher F Clark <christopher.f.clark@compiler-resources.com> - 2022-06-06 20:11 +0300
csiph-web