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,6d748e86b56b1269 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-28 18:09:45 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!sccrnsc04.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: Prefix to 'ACCESS must either statically match... But why? References: X-Newsreader: Tom's custom newsreader Message-ID: NNTP-Posting-Host: 12.234.13.56 X-Complaints-To: abuse@attbi.com X-Trace: sccrnsc04 1043806184 12.234.13.56 (Wed, 29 Jan 2003 02:09:44 GMT) NNTP-Posting-Date: Wed, 29 Jan 2003 02:09:44 GMT Organization: AT&T Broadband Date: Wed, 29 Jan 2003 02:09:44 GMT Xref: archiver1.google.com comp.lang.ada:33529 Date: 2003-01-29T02:09:44+00:00 List-Id: > the Ada approach with Ada.Text_Io; procedure Testas is type Index_Pairs is record Left, Right : Natural := 0; end record; type Index_Pair_Lists is array (1 .. 4) of Index_Pairs; procedure Target_Proc(A, B, C, D : in String) is begin Ada.Text_Io.Put_Line(D & C & B & A); end Target_Proc; procedure Pass_It_On(S : in String; List : in Index_Pair_Lists) is begin Target_Proc(S(List(1).Left .. List(1).Right), S(List(2).Left .. List(2).Right), S(List(3).Left .. List(3).Right), S(List(4).Left .. List(4).Right)); end Pass_It_On; Test_String: constant String := "now is the time"; function Find_Substrings(Source : String) return Index_Pair_Lists is begin return ((1, 3), (5, 6), (8, 10), (12, 15)); -- fake it end Find_Substrings; begin Pass_It_On(Test_String, Find_Substrings(Test_String)); end Testas;