comp.lang.ada
 help / color / mirror / Atom feed
From: mheaney@ni.net (Matthew Heaney)
Subject: Re: 'first of strings returned from a function should be 1?
Date: 1997/07/27
Date: 1997-07-27T00:00:00+00:00	[thread overview]
Message-ID: <mheaney-ya023680002707971752160001@news.ni.net> (raw)
In-Reply-To: 5rg99c$pg1$1@goanna.cs.rmit.edu.au


In article <5rg99c$pg1$1@goanna.cs.rmit.edu.au>, Dale Stanbrough
<dale@goanna.cs.rmit.EDU.AU> wrote:


>If I selected a field, and wanted to check whether a substring existed...
>
>   if Index (Field (Line, 2, ':'), "xxx") = 0 then
>
>Copying the string (yet again) just to pass it to another function didn't
>seem to make sense. Perhaps I could also write Field as a procedure returning 
>an upper and lower bound to eliminate all copying.

I don't know what you mean either, by "copying the string just to pass it
to another function."  If Field is a function that returns a string, and
you pass it as an argument to another subprogram, on what basis are you
assuming a copy occurs?  Strings (and other arrays and records) are usually
passed by reference.  What's different about your problem?

--------------------------------------------------------------------
Matthew Heaney
Software Development Consultant
<mailto:matthew_heaney@acm.org>
(818) 985-1271




  reply	other threads:[~1997-07-27  0:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5rcaqi$le8$1@goanna.cs.rmit.edu.au>
1997-07-26  0:00 ` 'first of strings returned from a function should be 1? Matthew Heaney
1997-07-27  0:00 ` David C. Hoos, Sr.
1997-07-27  0:00   ` Matthew Heaney
1997-07-28  0:00     ` Robert A Duff
1997-07-29  0:00       ` Anonymous
1997-07-30  0:00         ` Robert A Duff
1997-07-30  0:00       ` Dale Stanbrough
1997-07-27  0:00   ` Dale Stanbrough
1997-07-27  0:00     ` Robert A Duff
1997-07-27  0:00       ` Dale Stanbrough
1997-07-27  0:00         ` Matthew Heaney [this message]
1997-07-27  0:00   ` Simon Wright
1997-07-27  0:00 ` Dale Stanbrough
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox