From: tmoran@acm.org
Subject: Re: Prefix to 'ACCESS must either statically match... But why?
Date: Wed, 29 Jan 2003 02:09:44 GMT
Date: 2003-01-29T02:09:44+00:00 [thread overview]
Message-ID: <IJGZ9.71225$4y2.2773@sccrnsc04> (raw)
In-Reply-To: TJCZ9.7769$rq4.678319@bgtnsc05-news.ops.worldnet.att.net
> 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;
next prev parent reply other threads:[~2003-01-29 2:09 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-27 7:12 Prefix to 'ACCESS must either statically match... But why? Grein, Christoph
2003-01-27 15:46 ` Wojtek Narczynski
2003-01-27 22:32 ` James S. Rogers
2003-01-28 2:51 ` Wojtek Narczynski
2003-01-28 3:19 ` James S. Rogers
2003-01-28 12:14 ` Wojtek Narczynski
2003-01-28 14:43 ` James S. Rogers
2003-01-28 20:20 ` Wojtek Narczynski
2003-01-28 21:36 ` James S. Rogers
2003-01-29 2:09 ` tmoran [this message]
2003-01-29 11:21 ` Wojtek Narczynski
-- strict thread matches above, loose matches on Subject: below --
2003-01-30 6:20 Grein, Christoph
2003-01-29 12:15 Grein, Christoph
2003-01-29 11:57 Grein, Christoph
2003-01-29 6:50 Grein, Christoph
2003-01-29 11:30 ` Wojtek Narczynski
2003-01-27 6:41 Grein, Christoph
2003-01-27 18:33 ` Martin Krischik
2003-01-27 19:05 ` Jeffrey Carter
2003-01-25 22:31 Wojtek Narczynski
2003-01-26 9:57 ` Martin Krischik
2003-01-27 19:30 ` Vadim Godunko
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox