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,58e0097f787e49d4,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-01 14:05:08 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newshub2.rdc1.sfba.home.com!news.home.com!news2.POSTED!not-for-mail From: "Clueless" Subject: Naturals and discrete types Newsgroups: comp.lang.ada User-Agent: Pan/0.10.0 (Unix) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Comment-To: ALL Message-ID: Date: Thu, 01 Nov 2001 22:05:08 GMT NNTP-Posting-Host: 24.0.109.49 X-Complaints-To: abuse@home.net X-Trace: news2 1004652308 24.0.109.49 (Thu, 01 Nov 2001 14:05:08 PST) NNTP-Posting-Date: Thu, 01 Nov 2001 14:05:08 PST Organization: Excite@Home - The Leader in Broadband http://home.com/faster Xref: archiver1.google.com comp.lang.ada:15592 Date: 2001-11-01T22:05:08+00:00 List-Id: Recently I've been monkeying with the Ada.Command_Line package. Now I'm running into trouble reading the argument count. The Ada.Command_Line package returns a Natural type, however I've been attempting to count the arguments using the Range attribute which expects a discrete type. What I've been doing is converting the Natural to an Integer using the Value attribute. Sometimes this works, and sometimes I get an Exception. Is it possible to get the 'Range function to accept a Natural type? Or am I trekking down the wrong path entirely? It seems there has to be a better way to do this. Also, I've been checking my Ada docs to find out if the Natural type is considered to be a Discrete or Real type by the GNAT compiler, but I havent found any specific info yet. Although the compiler messages certainly seem to indicate that Natural is a subtype of Real. Forgive me if this question seems mundane. I've never really had to worry about the difference back when I was doing C. Heh. Any clarification, or pointers to the pertinent docs, would be helpful. Clueless McDoobie chris@dont.spam.me