Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Borland Delphi > Re: How To Chec...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 16 of 17 Topic 3709 of 3953
Post > Topic >>

Re: How To Check if an object is created (instantiated)?

by "Rudy Velthuis" <newsgroups@[EMAIL PROTECTED] > Apr 27, 2008 at 08:48 PM

Danny Strümpel wrote:

> Rudy Velthuis schrieb:
> > Danny Strümpel wrote:
> > 
> > > To check for instantiation use "if Assigned(R) then ..."
> > 
> > No, don't. It is useless. If the variable is local, it most likely
> > isn't nil, and Assigned() ONLY checks for nil, nothing more.
> 
> I assumed correct assignment of the referenced object, either to nil
> or to a valid pointer. If you're passing invalid pointers, how would
> you check their validity?

ISTM that that is exactly what the OP wants to test: if a pointer
passed in is initialized or not. If it is nil, it was obviously
initialized, either by the RTL or by the "user". But if it is not nil,
you don't know if it was. IOW, you can't test that.
-- 
Rudy Velthuis        http://rvelthuis.de

"Man has no right to kill his brother. It is no excuse that he
 does so in uniform: he only adds the infamy of servitude to
 the crime of murder." -- Percy Bysshe Shelley
 




 17 Posts in Topic:
How To Check if an object is created (instantiated)?
mohamad@[EMAIL PROTECTED]  2008-04-26 07:47:33 
Re: How To Check if an object is created (instantiated)?
Jim P <Jim_P@[EMAIL PR  2008-04-26 11:37:13 
Re: How To Check if an object is created (instantiated)?
Locke <jlocke@[EMAIL P  2008-04-26 20:47:02 
Re: How To Check if an object is created (instantiated)?
=?ISO-8859-1?Q?Danny_Str=  2008-04-26 23:00:50 
Re: How To Check if an object is created (instantiated)?
"Rudy Velthuis"  2008-04-26 23:05:30 
Re: How To Check if an object is created (instantiated)?
=?ISO-8859-1?Q?Danny_Str=  2008-04-27 13:46:55 
Re: How To Check if an object is created (instantiated)?
"Rudy Velthuis"  2008-04-27 20:46:03 
Re: How To Check if an object is created (instantiated)?
"Rudy Velthuis"  2008-04-26 22:53:00 
Re: How To Check if an object is created (instantiated)?
"alanglloyd@[EMAIL P  2008-04-26 14:05:39 
Re: How To Check if an object is created (instantiated)?
=?UTF-8?B?RGFubnkgU3Ryw7x  2008-04-26 23:22:04 
Re: How To Check if an object is created (instantiated)?
Jamie <jamie_ka1lpa_no  2008-04-26 18:56:13 
Re: How To Check if an object is created (instantiated)?
"Rudy Velthuis"  2008-04-26 23:11:32 
Re: How To Check if an object is created (instantiated)?
=?ISO-8859-1?Q?Danny_Str=  2008-04-26 23:17:02 
Re: How To Check if an object is created (instantiated)?
"Rudy Velthuis"  2008-04-26 23:00:22 
Re: How To Check if an object is created (instantiated)?
=?ISO-8859-1?Q?Danny_Str=  2008-04-27 13:31:09 
Re: How To Check if an object is created (instantiated)?
"Rudy Velthuis"  2008-04-27 20:48:58 
Re: How To Check if an object is created (instantiated)?
"Rudy Velthuis"  2008-04-26 22:46:30 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Oct 14 9:06:12 CDT 2008.