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=-0.2 required=5.0 tests=BAYES_00,PLING_QUERY, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,b6d862eabdeb1fc4 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!87.79.20.105.MISMATCH!news.netcologne.de!ramfeed1.netcologne.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Ada noob here! Is Ada widely used? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <0e88de66-128c-48fd-9b9f-fdb4357f318a@z17g2000vbd.googlegroups.com> Date: Sat, 5 Jun 2010 21:34:27 +0200 Message-ID: NNTP-Posting-Date: 05 Jun 2010 21:34:27 CEST NNTP-Posting-Host: c69030b3.newsspool4.arcor-online.net X-Trace: DXC=J7O14hQbHgaeoCI^f\Y]Ea4IUK On Sat, 05 Jun 2010 09:02:36 -0700, Nasser M. Abbasi wrote: > On 6/5/2010 5:59 AM, Dmitry A. Kazakov wrote: > > >> Sorry guys, maybe I missed the point, but Ada does have complex types. See >> ARM G.1. >> > I meant complex type in ada is not an elementary type. as in BTW, as the name suggest "complex" is not "elementary"! (:-)) > http://www.adaic.org/standards/05rm/html/RM-3-2.html > > "The elementary types are the scalar types (discrete and real) and the > access types (whose values provide access to objects or subprograms). > Discrete types are either integer types or are defined by enumeration of > their values (enumeration types). Real types are either floating point > types or fixed point types." Well, in fact I don't know why ARM defines that, because beyond the name there is nothing that could distinguish them from other types. > and > > http://en.wikibooks.org/wiki/Ada_Programming/Type_System > > I copied the list from above: > > "Here is a broad overview of each category of types; please follow the > links for detailed explanations. Inside parenthesis there are > equivalences in C and Pascal for readers familiar with those languages." > > Signed Integers (int, INTEGER) > Unsigned Integers (unsigned, CARDINAL) > unsigned they also have wrap-around functionality. > Enumerations (enum, char, bool, BOOLEAN) > Floating point (float, double, REAL) > Ordinary and Decimal Fixed Point (DECIMAL) > Arrays ( [ ], ARRAY [ ] OF, STRING ) > Record (struct, class, RECORD OF) > Access (*, ^, POINTER TO) > Task & Protected (no equivalence in C or Pascal) > Interfaces (no equivalence in C or Pascal) > > I do not see complex type there :) Same as above. Some of these are classes of types some are not. To be sure, complex is not a type you can derive from. But Integer isn't either. It cannot be constrained, but that does not make much sense anyway, and records cannot be constrained as well. It is not a formal generic class of types, neither are records. > Ofcourse, a standard generic package for complex type, I knew that. > > In FORTRAN: > > http://www.fortran.com/F77_std/rjcnf-4.html#sh-4 > > "4.1 Data Types > The six types of data are: > > 1. Integer > 2. Real > 3. Double precision > 4. Complex > 5. Logical > 6. Character > > " > > So, complex is an elementary type, like an integer is. Maybe, but what does it mean semantically? -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de