🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #4745

Re: closing form

#4745
From: Remy Lebeau (TeamB)
Date: Mon, 28 Nov 2005 22:49
20 lines
1883 bytes
"Alfred" <alf@no.spam.not.valid.email> wrote in message
news:43887cec$1@newsgroups.borland.com...

> I always writed this code without "&" :
>
> bool __fastcall ExecuteFile(AnsiString FileName);
>
> and no warning.. It is not correct ?

The code is technically fine, and there will not be any warning generated in
that situation.  The warning is only generated when passing a value to a
non-const reference parameter, specifying a value that does not exactly
match the parameter's data type (in this case, AnsiString).  A reference
must always be passed the exact data type that is being referenced.
Anything else passed in requires an implicit conversion by the compiler, and
thus a warning is issued.


Gambit
Technical Details
Message-ID: <438b89a3$3@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
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> <43859c65$1@newsgroups.borland.com> <43887cec$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> <43859c65$1@newsgroups.borland.com> <43887cec$1@newsgroups.borland.com>
Subject: Re: closing form
Date: Mon, 28 Nov 2005 14:49:24 -0800
Lines: 22
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: <438b89a3$3@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1133218211 68.69.17.41 (28 Nov 2005 14:50:11 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail