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,364deb6698b494cb X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-06-01 07:04:20 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!howland.erols.net!news-out.worldnet.att.net.MISMATCH!wn3feed!worldnet.att.net!135.173.83.71!wnfilter1!worldnet-localpost!bgtnsc05-news.ops.worldnet.att.net.POSTED!not-for-mail Message-ID: <3B17A17C.A4A60B54@worldnet.att.net> From: James Rogers X-Mailer: Mozilla 4.76 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada String Issue: String within Strings References: <4713a80b.0106010531.7f6f4da8@posting.google.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Fri, 01 Jun 2001 14:04:19 GMT NNTP-Posting-Host: 12.82.138.34 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc05-news.ops.worldnet.att.net 991404259 12.82.138.34 (Fri, 01 Jun 2001 14:04:19 GMT) NNTP-Posting-Date: Fri, 01 Jun 2001 14:04:19 GMT Organization: AT&T Worldnet Xref: archiver1.google.com comp.lang.ada:7971 Date: 2001-06-01T14:04:19+00:00 List-Id: Xcalibre wrote: > > Just a little hello and little comment that I've enjoyed reading > through this newsgroup. > > My problem is this: I am Get_Line-ing from a file... what I want to > do is check that line of text for a particular phrase given (not just > a word). I've tried using Index() and I get an Error that says... > > extract.adb:73:66: array type required in indexed component > (Code Deleted) > > Is what I am doing the right idea or is there a different built in > function that will do what C does in comparing the text and returning > the location of where it starts? > Look at the generic package Ada.Strings.Bounded. It includes several search functions for substrings within strings. These functions are, at an abstract level, similar to the C function strstr(). Jim Rogers Colorado Springs, Colorado USA