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,8623fab5750cd6aa X-Google-Attributes: gid103376,public Path: g2news1.google.com!news1.google.com!news.glorb.com!wn14feed!worldnet.att.net!attbi_s04.POSTED!53ab2750!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: Improving Ada's image - Was: 7E7 Flight Controls Electronics References: X-Newsreader: Tom's custom newsreader Message-ID: NNTP-Posting-Host: 24.6.132.82 X-Complaints-To: abuse@comcast.net X-Trace: attbi_s04 1087705463 24.6.132.82 (Sun, 20 Jun 2004 04:24:23 GMT) NNTP-Posting-Date: Sun, 20 Jun 2004 04:24:23 GMT Organization: Comcast Online Date: Sun, 20 Jun 2004 04:24:23 GMT Xref: g2news1.google.com comp.lang.ada:1708 Date: 2004-06-20T04:24:23+00:00 List-Id: >In this case you have been offered two ways to program a ragged array in >Ada, one in which the pointer is explicit Red'Access, one in which it is >implicit, Unbounded_String, and one where the ragged array is created by >the compiler as part of the type declaration. A third (fourth?) way is type Top_Succession is (President, Vice_President, Speaker, Senate_President_pro_tempore, Sec_State, Sec_Treasury); function Name(Who : Top_Succession) return String is begin case Who is when President => return "Bush"; when Vice_President => return "Cheney"; when Speaker => return "Hastert"; when Senate_President_pro_tempore => return "Stevens"; when Sec_State => return "Powell"; when Sec_Treasury => return "Snow"; end case; end Name; This, unlike Red=>"RED", allows for change in the value/string relationship.