From: "Clueless" <chris@dont.spam.me>
Subject: Naturals and discrete types
Date: Thu, 01 Nov 2001 22:05:08 GMT
Date: 2001-11-01T22:05:08+00:00 [thread overview]
Message-ID: <oGjE7.221593$K6.106487221@news2> (raw)
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
next reply other threads:[~2001-11-01 22:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-01 22:05 Clueless [this message]
2001-11-01 22:35 ` Naturals and discrete types Matthew Heaney
2001-11-01 22:59 ` Clueless
2001-11-02 15:05 ` Marin David Condic
2001-11-02 17:24 ` Ted Dennison
2001-11-02 18:19 ` Preben Randhol
2001-11-02 18:51 ` Marin David Condic
2001-11-03 18:01 ` Nick Roberts
2001-11-04 4:18 ` tmoran
2001-11-05 15:29 ` Marin David Condic
2001-11-04 11:39 ` Preben Randhol
2001-11-05 2:01 ` Clueless
2001-11-05 2:37 ` Larry Kilgallen
-- strict thread matches above, loose matches on Subject: below --
2001-11-01 23:06 Beard, Frank
2001-11-01 23:20 ` Clueless
2001-11-02 3:05 ` DuckE
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox