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,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,941b3f6b2986b386 X-Google-Attributes: gid103376,public From: Stephen Leake Subject: Re: access function in strings.maps Date: 1997/04/28 Message-ID: <3364B7E4.7CE8@gsfc.nasa.gov>#1/1 X-Deja-AN: 237925242 References: <336154D9.4E0A@calpoly.edu> Organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA Reply-To: Stephen.Leake@gsfc.nasa.gov Newsgroups: comp.lang.ada Date: 1997-04-28T00:00:00+00:00 List-Id: Dennis W. Butler wrote: > > I've been exploring the string handling capabilities of Ada95 and have > stumbled across a Thing I can't figure out. In the strings.maps package > (LRM section A.4.2), there is a type definition that reads: > > type Character_Mapping_Function is access function (From : in character) > return character; > > I would have thought a Character_Mapping_Function would be more like: > > function Character_Mapping_Function (The_Map: in Character_Mapping; > Domain_Character: in Character) return Character; -- range character > Nope, 'Character_Mapping_Function' is used for _encoding_ a complex map as a function. > Although I read LRM section 3.10, I couldn't figure out the access > function type definition. Where can I get an explanation of what the > type definition does and how I can use it? I did note that the LRM says > that the Character_mapping_Function is used for transformational > mappings in the Translate subprograms...does this mean I'm not supposed > to worry about it? Thus Translate takes a 'Character_Mapping_Function' as a parameter to specify the map. I got this explanation from Cohen's "Ada as a Second Language"; a very good and thorough book. For a list of other good books, see: http://www.adahome.com/Resources/Books/ada95reviews.html > Thanks, > > Dennis Butler > Computer Science Department > Cal Poly, San Luis Obispo You're welcome. -- - Stephe