Re: Pascal vs C style string ?

prener@watson.ibm.com (Dan Prener)
Mon, 27 Jun 1994 02:56:05 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)
[12 later articles]
| List of all articles for this month |

Newsgroups: comp.compilers
From: prener@watson.ibm.com (Dan Prener)
Keywords: Pascal, C, design
Organization: IBM T.J. Watson Research Center, Hawthorne, New York
References: 94-06-175 94-06-195
Date: Mon, 27 Jun 1994 02:56:05 GMT

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


ssimmons@convex.com (Steve Simmons) writes:
> Another minor benefit is the restriction on size. String0 has no
> restriction at all other than the user's memory.


While it is certainly true that the size of length-attributed strings is
constrained by the size of the length field, there is another dimension to
this problem.


The use of zero-terminated strings restricts the contents of strings. They
cannot include the zero byte. Length-attributed strings can contain
arbitrary data.
--
                                                                      Dan Prener (prener@watson.ibm.com)
--


Post a followup to this message

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