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: 103376,b6d862eabdeb1fc4 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!goblin2!goblin.stu.neva.ru!aioe.org!not-for-mail From: "Nasser M. Abbasi" Newsgroups: comp.lang.ada Subject: Re: Ada noob here! Is Ada widely used? Date: Sat, 05 Jun 2010 09:02:36 -0700 Organization: Aioe.org NNTP Server Message-ID: References: <0e88de66-128c-48fd-9b9f-fdb4357f318a@z17g2000vbd.googlegroups.com> Reply-To: nma@12000.org NNTP-Posting-Host: MOc+zCmAn9OYd2RtD/y8oA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 Xref: g2news2.google.com comp.lang.ada:12284 Date: 2010-06-05T09:02:36-07:00 List-Id: 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 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." 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 :) 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. I am learning to use complex numbers in Ada from wiki Ada book, was looking at the examples here: http://en.wikibooks.org/wiki/Ada_Programming/Mathematical_calculations#Complex_arithmethic and it seem many packages need to be instantiated just to use complex numbers. with Ada.Text_IO.Complex_IO; with Ada.Numerics.Generic_Complex_Types; with Ada.Numerics.Generic_Complex_Elementary_Functions; etc.. I just meant it seems "easier" to use complex numbers in FORTRAN than Ada, just because one does not to do all this instantiating every where. But I hope to learn to use complex numbers better in Ada, I have very little experiences with this in Ada. --Nasser