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,c1ea0727ea6143f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-01 08:54:30 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!newsfeed.mathworks.com!btnet-peer0!btnet-feed5!btnet!news.btopenworld.com!not-for-mail From: "Martin Dowie" Newsgroups: comp.lang.ada Subject: Re: Can help me interpret this in Ada! Newbie here Date: Fri, 1 Nov 2002 16:53:54 +0000 (UTC) Organization: BT Openworld Message-ID: References: <3dc2adbc$1@news.starhub.net.sg> NNTP-Posting-Host: host213-123-139-231.in-addr.btopenworld.com X-Trace: sparta.btinternet.com 1036169634 17719 213.123.139.231 (1 Nov 2002 16:53:54 GMT) X-Complaints-To: news-complaints@lists.btinternet.com NNTP-Posting-Date: Fri, 1 Nov 2002 16:53:54 +0000 (UTC) X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MSMail-Priority: Normal X-Priority: 3 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Xref: archiver1.google.com comp.lang.ada:30289 Date: 2002-11-01T16:53:54+00:00 List-Id: "ulysses" wrote in message news:3dc2adbc$1@news.starhub.net.sg... > subtype SRU_ID_Type is Machine.Bit_4 range 0 .. 6 ; <--- what does it mean > it Ada > > Ok does this means it's an array of 7 Machine.Bit_4 ?? No, it means it is declaring a type with a range based on the type "Bit_4", which is declared in package Machine. Presumably the type "Bit_4" is a type that defined as having a "'Size" of 4 (4 bits). The 'sub' in 'subtype' is important though - it means it isn't creating a whole new type but rather using all the information from an existing type (in this case 'Bit_4') but adding a further restriction. All the routines that are available to 'Bit_4' can be made available to the new subtype without the need for an explicit type conversion. So, you couldn't declare local procedures: procedure Do_Something (X : Machine.Bit_4); and procedure Do_Something (X : SRU_ID_Type); as "SRU_ID_Type" is really a special case of "Machine.Bit_4" already. Go to http://www.it.bton.ac.uk/staff/je/adacraft/ and read section 5.3, preferably having read all the previous chapters first! :-) Also, see www.adapower.com