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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,af5bf4e3cf0c28b8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-05-30 06:37:18 PST From: "Martin Dowie" Newsgroups: comp.lang.ada References: Subject: Re: Cannot use NULL as identifier? Date: Wed, 30 May 2001 14:32:34 +0100 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 NNTP-Posting-Host: sg2c11210.dsge.edinbr.gmav.gecm.com Message-ID: <3b14f3d0$1@pull.gecm.com> X-Trace: 30 May 2001 14:21:20 GMT, sg2c11210.dsge.edinbr.gmav.gecm.com Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!dispose.news.demon.net!demon!btnet-peer0!btnet-feed5!btnet!newreader.ukcore.bt.net!pull.gecm.com!sg2c11210.dsge.edinbr.gmav.gecm.com Xref: archiver1.google.com comp.lang.ada:7874 Date: 2001-05-30T14:32:34+01:00 List-Id: ASCII is an obsolete package, use Ada.Characters.Latin_1 instead. The other problem you have is 'NULL' with 2 'L' characters. So what you need is: FilePath : constant string := "tesfile.xxx" & Ada.Characters.Latin_1.Nul; Alternatively, it looks like you're trying to do things in a 'C'-way, or interface with some 'C' routines, so have a look at Interfaces.C (and maybe Interfaces.C.Strings) to find routines to create nul-terminated strings. Enjoy! McDoobie wrote in message news:Ad6R6.1259$DG1.337725@news1.rdc1.mi.home.com... > 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