comp.lang.ada
 help / color / mirror / Atom feed
From: Ted Dennison<dennison@telepath.com>
Subject: Re: Cannot use NULL as identifier?
Date: Wed, 30 May 2001 13:22:23 GMT
Date: 2001-05-30T13:22:23+00:00	[thread overview]
Message-ID: <ju6R6.5167$rn5.256608@www.newsranger.com> (raw)
In-Reply-To: Ad6R6.1259$DG1.337725@news1.rdc1.mi.home.com

In article <Ad6R6.1259$DG1.337725@news1.rdc1.mi.home.com>, McDoobie says...
>
>FilePath : constant string := "tesfile.xxx" & ASCII.NULL;
>
>Now, the GNAT compiler on Linux gives me the error 
>"reserved word NULL cannot be used as identifier "

OK. There are 3 issues here:

1)  "null" is a keyword. It is used for "null" statements, and as a default
value for access objects. You can't create a variable with that name any more
than you can create a variable named "if".

2) The value you are looking for is "ASCII.NUL", not "ASCII.NULL". (A quick
check of the package specification would have told you this.

3) The package ASCII is obsolescent, so I wouldn't use it in new code if I were
you. You should be using "Ada.Characters.Latin_1.Nul".

---
T.E.D.    homepage   - http://www.telepath.com/dennison/Ted/TED.html
          home email - mailto:dennison@telepath.com



  reply	other threads:[~2001-05-30 13:22 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-30 13:04 Cannot use NULL as identifier? McDoobie
2001-05-30 13:22 ` Ted Dennison [this message]
2001-05-30 13:27 ` Philip Anderson
2001-05-30 16:40   ` Pascal Obry
2001-05-31 11:49     ` Mats Karlssohn
2001-05-31 12:30       ` David C. Hoos, Sr.
2001-05-31 13:33         ` Mats Karlssohn
2001-05-31 16:26           ` Mario Amado Alves
2001-06-03 10:25         ` Florian Weimer
2001-05-30 20:52   ` Florian Weimer
2001-05-30 13:32 ` Martin Dowie
2001-05-30 13:33 ` Petter Fryklund
2001-05-31  3:15   ` Randy Brukardt
2001-05-30 13:52 ` Marin David Condic
2001-05-31  2:09   ` Robert A Duff
2001-05-31 10:49   ` McDoobie
2001-05-31 15:12     ` Marin David Condic
2001-06-01 14:01       ` John English
2001-06-01 14:48         ` Ted Dennison
2001-06-01 15:57           ` John English
2001-06-02  6:21             ` Simon Wright
2001-06-01 15:03         ` Gary Scott
2001-06-04 13:46           ` Marin David Condic
2001-06-01 15:19         ` Marin David Condic
2001-06-01 15:26         ` Brian Rogoff
2001-06-01 16:16         ` David Gillon
2001-06-04 12:02         ` Stephen Leake
2001-06-04 17:54           ` tmoran
2001-06-04 18:51             ` Marin David Condic
2001-06-04 21:24               ` Paper or Plastic? Ted Dennison
2001-06-06  9:28           ` Cannot use NULL as identifier? Mats Karlssohn
2001-06-06  9:37             ` John English
2001-06-06  9:48             ` David C. Hoos, Sr.
2001-06-06 10:05               ` Mats Karlssohn
2001-06-05  8:37         ` Tarjei T. Jensen
2001-06-05 14:14           ` Web Publishing was " Robert C. Leif, Ph.D.
2001-06-06  8:12             ` Tarjei T. Jensen
2001-05-30 13:58 ` Claude SIMON
  -- strict thread matches above, loose matches on Subject: below --
2001-05-30 21:45 Beard, Frank
2001-05-31 14:53 ` John English
2001-06-02 10:53 ` Florian Weimer
2001-06-04 18:16 Beard, Frank
2001-06-04 20:36 ` Robert A Duff
2001-06-04 22:48 Beard, Frank
2001-06-05  2:34 ` Robert A Duff
2001-06-05 17:23 Beard, Frank
2001-06-06 15:53 ` Tucker Taft
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox