Re: Pascal vs C style string ?

eifrig@beanworld.cs.jhu.edu (Jonathan Eifrig)
Tue, 28 Jun 1994 02:17:02 GMT

          From comp.compilers

Related articles
Pascal vs C style string ? guerin@IRO.UMontreal.CA (1994-06-24)
Pascal vs C style string ? ssimmons@convex.com (1994-06-26)
Re: Pascal vs C style string ? prener@watson.ibm.com (1994-06-27)
Re: Pascal vs C style string ? jhallen@world.std.com (1994-06-27)
Re: Pascal vs C style string ? ddean@robadome.com (1994-06-27)
Re: Pascal vs C style string ? boehm@parc.xerox.com (1994-06-27)
Re: Pascal vs C style string ? nandu@cs.clemson.edu (1994-06-27)
Re: Pascal vs C style string ? eifrig@beanworld.cs.jhu.edu (1994-06-28)
Re: Pascal vs C style string ? monnier@di.epfl.ch (Stefan Monnier) (1994-06-28)
Re: Pascal vs C style string ? eru@tele.nokia.fi (Erkki Ruohtula) (1994-06-28)
Re: Pascal vs C style string ? andrew@cee.hw.ac.uk (1994-06-28)
Re: Pascal vs C style string ? jhallen@world.std.com (1994-06-28)
Re: Pascal vs C style string ? larryr@pa.dec.com) (1994-06-28)
Re: Pascal vs C style string ? boehm@parc.xerox.com (1994-06-28)
[7 later articles]
| List of all articles for this month |

Newsgroups: comp.compilers
From: eifrig@beanworld.cs.jhu.edu (Jonathan Eifrig)
Keywords: C, Pascal, design
Organization: The Johns Hopkins University CS Department
References: 94-06-175 94-06-211
Date: Tue, 28 Jun 1994 02:17:02 GMT

guerin@IRO.UMontreal.CA:
> Is there some reasons to use string0 over length attributed string ??


Drew Dean <ddean@robadome.com> wrote:
>There's also one great advantage of giving strings explicit lengths:
>0 is no longer a special value. One easy example of this
>is if you're printing bitmapped graphics to a dot-matrix printer --
>a zero byte means don't fire any pins in this column, not end of string!


True, but *character* strings should only contain valid
*characters*. The real moral of the story is that you should be using
a data representation appropriate to the data to be represented. :-)


If you want to deal with arrays of bytes, you should deal with
arrays of bytes. :-)


Jack Eifrig (eifrig@cs.jhu.edu) The Johns Hopkins University, C.S. Dept.
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.