From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,PLING_QUERY autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,9a5e0182cbfaa45b X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news2.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe02.iad.POSTED!1d9d5bd3!not-for-mail From: David Thompson Newsgroups: comp.lang.ada Subject: Re: Does mmap gives a right result?! Message-ID: References: <459d08e4-1370-4925-9d9f-64ee0f472c19@f25g2000yqc.googlegroups.com> <883039ec-23a1-49ff-b633-363a3775a5b2@p26g2000yqb.googlegroups.com> X-Newsreader: Forte Agent 3.3/32.846 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@teranews.com NNTP-Posting-Date: Mon, 11 Oct 2010 03:03:36 UTC Organization: TeraNews.com Date: Sun, 10 Oct 2010 23:03:51 -0400 Xref: g2news1.google.com comp.lang.ada:14477 Date: 2010-10-10T23:03:51-04:00 List-Id: On Sun, 3 Oct 2010 12:32:25 -0700 (PDT), Shark8 wrote: > On Oct 3, 1:22�pm, Francesco PIRANEO GIULIANO > wrote: > > There is an equivalence of the C's NULL in Ada? > Like too many things in C NULL is somewhat ill-defined; do you mean > the character-sized all-zero value used to terminate strings, or the > all-zero valued memory-address sized pointer value? By the context > here it is obvious that the later is what you're asking about but Ada > provides both: There is the Character NUL and the "null" keyword > which, in access-terms, is the null-pointer, the "null" keyword > resolves down to other meanings depending on the context: the null- > statement, a null-record, etc. C is case-sensitive. It does use the term 'null' for both a character -- actually an integer, since chars in C are just small integers; and a special pointer value -- which traditionally is in fact zero, but the Standard only requires that it acts like zero: a _constant_ zero in a pointer context becomes a null pointer, and a (valid) pointer compared for equality to zero is true iff the pointer is null, but the actual null pointer representation need not be all zero bits, see 5 esp. 5.5 in the comp.lang.c FAQ at usual places and www.c-faq.com . But the macro named 'NULL' is only the pointer value. There is no standard or even common name for the null character, which can be written as a literal '\0' or just the integer literal 0.