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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5c1c45943bf6a5bc X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: 'first of strings returned from a function should be 1? Date: 1997/07/27 Message-ID: #1/1 X-Deja-AN: 259494746 References: <5rcaqi$le8$1@goanna.cs.rmit.edu.au> <01bc9a76$459c2250$4c8371a5@dhoossr> <5rfcs1$i3j$1@goanna.cs.rmit.edu.au> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 1997-07-27T00:00:00+00:00 List-Id: In article <5rfcs1$i3j$1@goanna.cs.rmit.edu.au>, Dale Stanbrough wrote: >Because i wanted to call the function, store the first character and not >declare a local string. I am guessing that a local string would require >extra copying (which i generally try to design out of programs) >from heap to stack, although this may not be the case. I don't get it. It sounds like you're willing to painstakingly calculate 387 characters, and then throw away all but one of them. But yet you begrudge the copying of them. What's the real-life example where this makes sense? - Bob