Article View: borland.public.cppbuilder.nativeapi
Article #4813Re: closing form
From: Remy Lebeau (TeamB)
Date: Thu, 24 Nov 2005 10:51
Date: Thu, 24 Nov 2005 10:51
28 lines
1747 bytes
1747 bytes
"david johnson" <davidjohnson@gmail.com> wrote in message
news:4385975c$1@newsgroups.borland.com...
> is it necessary to precede it with const?
No strictly necessary, but it does allows the compiler to optimize the code
a bit more than if 'const' is not used.
> What effect does this actually have? Why not simply use AnsiString
&FileName?
Consider the following:
bool __fastcall ExecuteFile(AnsiString &FileName);
ExecuteFile("Downloader.exe");
The compiler will produce a warning about a temporary being created.
bool __fastcall ExecuteFile(const AnsiString &FileName);
ExecuteFile("Downloader.exe");
The compiler will not produce a warning.
Gambit
Technical Details
Message-ID:
<43859c65$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!proxad.net!194.117.148.138.MISMATCH!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<4383d048$1@newsgroups.borland.com> <4383e16c$1@newsgroups.borland.com> <43845eca$1@newsgroups.borland.com> <4384eafc$1@newsgroups.borland.com> <4385975c$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,9d517b38f0628b82 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <4383d048$1@newsgroups.borland.com> <4383e16c$1@newsgroups.borland.com> <43845eca$1@newsgroups.borland.com> <4384eafc$1@newsgroups.borland.com> <4385975c$1@newsgroups.borland.com> Subject: Re: closing form Date: Thu, 24 Nov 2005 02:51:25 -0800 Lines: 30 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <43859c65$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1132829797 68.69.17.41 (24 Nov 2005 02:56:37 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!proxad.net!194.117.148.138.MISMATCH!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail