comp.lang.ada
 help / color / mirror / Atom feed
* Cannot use NULL as identifier?
@ 2001-05-30 13:04 McDoobie
  2001-05-30 13:22 ` Ted Dennison
                   ` (5 more replies)
  0 siblings, 6 replies; 47+ messages in thread
From: McDoobie @ 2001-05-30 13:04 UTC (permalink / raw)


I've written a small program that parses the contents of different
directories and searches for duplicate files.

I have an assignment that reads

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 "

Now, I'm using the text_io and gnat.os_lib libraries to compile this, so
I'm assuming that os_lib makes an allowance for this. However, I could be
mistaken. I ripped the above code fragement from a website, and the
website (the Big Book of Linux Ada programming) doesnt appear to  indicate
that theres a problem with this. (Of course I probably overlooked
something.)

I'm also searching through "Programming in Ada95"(Barnes) trying to find
info on this error.

Any tips or pointers would be helpful.

Thanks.

McDoobie
Chris@dont.spam.me



^ permalink raw reply	[flat|nested] 47+ messages in thread
* RE: Cannot use NULL as identifier?
@ 2001-05-30 21:45 Beard, Frank
  2001-05-31 14:53 ` John English
  2001-06-02 10:53 ` Florian Weimer
  0 siblings, 2 replies; 47+ messages in thread
From: Beard, Frank @ 2001-05-30 21:45 UTC (permalink / raw)
  To: 'comp.lang.ada@ada.eu.org'


-----Original Message-----
From: Ted Dennison [mailto:dennison@telepath.com]

> 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".

As Ben Brosgol pointed out, ASCII was obsolescent before
the ASCII standard was expanded to include characters 128
through 255.  So, the odds of ASCII becoming obsolete are
slim to none.  So, I wouldn't worry too much about whether
or not to use ASCII.

Even if it does become obsolete, it is a relatively
simply global substitute to replace "ASCII" with 
"Ada.Characters.Latin_1.Nul", or do a library level rename.
Besides "Ada.Characters.Latin_1.Nul" being ugly to look at,
if for nothing else, I will continue to use ASCII to avoid
the lame analogies of Latin to Ada made by some of the C++
hacks ("A dead language for a dead language").

Frank



^ permalink raw reply	[flat|nested] 47+ messages in thread
* RE: Cannot use NULL as identifier?
@ 2001-06-04 18:16 Beard, Frank
  2001-06-04 20:36 ` Robert A Duff
  0 siblings, 1 reply; 47+ messages in thread
From: Beard, Frank @ 2001-06-04 18:16 UTC (permalink / raw)
  To: 'comp.lang.ada@ada.eu.org'

Well, I saw it referenced somewhere, and Ben
confirmed it.  I think it was the same reason
type Character was expanded from 128 to 256.

In any event, the first 128 characters are 
never going to change.  So, worse case, I'll
cut and paste the current ASCII package and
paste it into my own "My_ASCII" package and
do a library level rename.  It will probably
have all the character constants I will ever
need.  Or I could be lazy and make ASCII
rename Latin_1.

And, if I turns out that I am wrong, then in
twenty years, when it finally goes away, I'll
admit you're right.  :-)

Frank

-----Original Message-----
From: Florian Weimer [mailto:fw@deneb.enyo.de]
Sent: Saturday, June 02, 2001 6:54 AM
To: comp.lang.ada@ada.eu.org
Subject: Re: Cannot use NULL as identifier?


"Beard, Frank" <beardf@spawar.navy.mil> writes:

> As Ben Brosgol pointed out, ASCII was obsolescent before
> the ASCII standard was expanded to include characters 128
> through 255.

Well, I think I've got a current copy of the ASCII standard, and it
defines only 128 characters...
_______________________________________________
comp.lang.ada mailing list
comp.lang.ada@ada.eu.org
http://ada.eu.org/mailman/listinfo/comp.lang.ada



^ permalink raw reply	[flat|nested] 47+ messages in thread
* RE: Cannot use NULL as identifier?
@ 2001-06-04 22:48 Beard, Frank
  2001-06-05  2:34 ` Robert A Duff
  0 siblings, 1 reply; 47+ messages in thread
From: Beard, Frank @ 2001-06-04 22:48 UTC (permalink / raw)
  To: 'comp.lang.ada@ada.eu.org'


-----Original Message-----
From: Robert A Duff [mailto:bobduff@world.std.com]

"Beard, Frank" <beardf@spawar.navy.mil> writes:

>> Well, I saw it referenced somewhere, and Ben
>> confirmed it.  I think it was the same reason
>> type Character was expanded from 128 to 256.
>
>Not sure what "it" Ben confirmed...

The extension of ASCII from 128 to 256 characters.

>> In any event, the first 128 characters are 
>> never going to change.  So, worse case, I'll
>> cut and paste the current ASCII package and
>> paste it into my own "My_ASCII" package and
>> do a library level rename.  It will probably
>> have all the character constants I will ever
>> need.  Or I could be lazy and make ASCII
>> rename Latin_1.
>
>It is illegal to have a library unit called ASCII.
>(And I'll bet you it will always be illegal.)

Seems like something would have happened by now
if this were true.

>> And, if I turns out that I am wrong, then in
>> twenty years, when it finally goes away, I'll
>> admit you're right.  :-)
>
>Package ASCII will never go away, so long as there
>is an Ada standard.

I agree with you.  I don't think it will ever go
away either, but the LRM did indicate that it 
probably would.

So, I think everyone's concerns were valid.
And if you don't mind using the
Ada.Characters.Latin_1, more power to you.

Frank



^ permalink raw reply	[flat|nested] 47+ messages in thread
* RE: Cannot use NULL as identifier?
@ 2001-06-05 17:23 Beard, Frank
  2001-06-06 15:53 ` Tucker Taft
  0 siblings, 1 reply; 47+ messages in thread
From: Beard, Frank @ 2001-06-05 17:23 UTC (permalink / raw)
  To: 'comp.lang.ada@ada.eu.org'


-----Original Message-----
From: Robert A Duff [mailto:bobduff@world.std.com]

>> I agree with you.  I don't think it will ever go
>> away either, but the LRM did indicate that it 
>> probably would.
>
> The RM says it's "obsolescent".  It doesn't say it's going away.

To quote my American Heritage Dictionary:

   obsolescent - In the process of passing out of use;
                 becoming obsolete.

   obsolete - No longer in use.

So it sounds to me like "obsolescent" means at some point
it will no longer be used, just not yet.

Frank



^ permalink raw reply	[flat|nested] 47+ messages in thread

end of thread, other threads:[~2001-06-06 15:53 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-30 13:04 Cannot use NULL as identifier? McDoobie
2001-05-30 13:22 ` Ted Dennison
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

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