More email from the same series of emails.
Neil
-------- Original Message --------
Subject: BOUNCE sv-ec@eda.org: Non-member submission from [Slater Rob-R53680 <R.Slater@freescale.com>]
Date: Tue, 23 Nov 2004 08:55:09 -0800 (PST)
From: owner-sv-ec@eda.org
To: sv-ec-approval@eda.org
Semantics aside, I don't understand what more than one NUL in a string is supposed to mean.
The fact that SystemVerilog allows this is, in my opinion, a bug which should be fixed.
The relevant committee should address this (SV-EC?)
Needless to say when SystemVerilog and C communicate, strings should be considered a
single NUL terminated collection of characters. (SV-CC)
If a users want to build a "string" will multiple NUL terminators, they should:
(a) Use multiple strings
(b) Be slapped if they refuse to do (a) (I vote this be put in
the spec)
If a user wants to pass along a block of memory which may have multiple \0 in it, there
are ways to do this without using strings.
Rob Slater
Freescale Semiconductor (FSL)
r.slater@freescale.com
> -----Original Message-----
> From: owner-sv-cc@eda.org [mailto:owner-sv-cc@eda.org] On Behalf
> Of Steven J. Dovich
> Sent: Tuesday, November 23, 2004 17:29
> To: Bresticker Shalom-R50386
> Cc: sv-cc@eda.org; sv-ec@eda.org
> Subject: Re: [sv-cc] RE: [sv-ec] Clarification on my earlier
> mail regarding on strings
>
> Yes, though as I noted, NUL as a character name is not
> acknowledged
> in the C standard. It is a (somewhat) common usage from the
> ASCII
> standard and is replaced in the C standard with "null
> character".
>
> When spelled in lower case, the word "null" is ambiguous and
> must
> be qualified by "character", "pointer", etc. The upper case NULL
> is the standardized spelling for a "null pointer", a constant
> expression evaluating to zero that is used as a pointer.
>
> /sjd
>
>
> > So NULL is a pointer and NUL is a character?
> >
> > Thanks,
> > Shalom
> >
> >
> > On Tue, 23 Nov 2004, Steven J. Dovich wrote:
> >
> > > My apologies to Doug and Rob for using their comments as a
> soapbox
> > > for a pre-existing problem in the Verilog standard.
> Fortunately 1800
> > > does not appear to have imported the problem, but we need to
> be
> > > vigilant that it does not spread. Now for the standards
> rant...
> > >
> > > To be properly consistent with the C language, we also need
> to
> > > recognize that NULL is not a character, it is a pointer. C
> strings
> > > are composed of characters and are terminated by a "null
> character".
> > > Common usage also designates the character valued as '\0' as
> the
> > > NUL character from the ASCII character names (note the three
> letter
> > > spelling).
> > >
> > > Our draft would be improved by not requiring the reader to
> understand
> > > that we didn't exactly mean what we really said.
> > >
> > > /sjd
> >
> > --
> > Shalom Bresticker Shalom.Bresticker
> @freescale.com
> > Design & Verification Methodology Tel: +972
> 9 9522268
> > Freescale Semiconductor Israel, Ltd. Fax: +972
> 9 9522890
> > POB 2208, Herzlia 46120, ISRAEL Cell: +972
> 50 5441478
> >
> > [ ]Freescale Internal Use Only [ ]Freescale Confidential
> Proprietary
-- --------------------------------------------------------------------- Neil Korpusik Tel: 408-720-4852 Member of Technical Staff Fax: 408-720-4850 Frontend Technologies - ASICs & Processors (FTAP) Sun Microsystems email: neil.korpusik@sun.com ---------------------------------------------------------------------Received on Tue Nov 23 13:38:59 2004
This archive was generated by hypermail 2.1.8 : Tue Nov 23 2004 - 13:39:02 PST