Re: Is there anywhay to work around there not being an IsNull Function
There are a couple of ways to check the status of a structure. isDefined(myStruct) will tell you if the variable has been created isStruct(myStruct) will tell you if the variable is a structure structCount(myStruct) will tell you if the structure has any keys (and how many keys) You can use any combination thereof. Sharon - Original Message - From: Brian Eckerman [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Thursday, March 21, 2002 11:26 AM Subject: RE: Is there anywhay to work around there not being an IsNull Function Right, but if it exists and hasn't been initialized what would be the default value? Or are you not allowed to create a variable without set it's value? -Original Message- From: Matthew R. Small [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 11:30 AM To: CF-Talk Subject: RE: Is there anywhay to work around there not being an IsNull Function Well, if it exists, check for the initialization values. - Matt Small -Original Message- From: Brian Eckerman [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 11:12 AM To: CF-Talk Subject: Is there anywhay to work around there not being an IsNull Function I was woried about declaring a struct, initializing it, and then being able to tell if the init was successfull. IsDeclared would be of no help in this situation, because you could have a struct without having it set up. What is the best way to validate whether a struct has been initialized properly. Brian Eckerman Web Developer __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Is there anywhay to work around there not being an IsNull Function
I was woried about declaring a struct, initializing it, and then being able to tell if the init was successfull. IsDeclared would be of no help in this situation, because you could have a struct without having it set up. What is the best way to validate whether a struct has been initialized properly. Brian Eckerman Web Developer __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Is there anywhay to work around there not being an IsNull Function
Well, if it exists, check for the initialization values. - Matt Small -Original Message- From: Brian Eckerman [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 11:12 AM To: CF-Talk Subject: Is there anywhay to work around there not being an IsNull Function I was woried about declaring a struct, initializing it, and then being able to tell if the init was successfull. IsDeclared would be of no help in this situation, because you could have a struct without having it set up. What is the best way to validate whether a struct has been initialized properly. Brian Eckerman Web Developer __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: Is there anywhay to work around there not being an IsNull Function
IsStruct() tells if a variable is a struct or not.. You could also cfparam name=struct_name default= Then cfif #IsStruct(struct_name)# cfelse /cfif Dunno if that answers your question or not... Paul Giesenhagen QuillDesign http://www.quilldesign.com SiteDirector v2.0 - Commerce Builder - Original Message - From: Brian Eckerman [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Thursday, March 21, 2002 10:11 AM Subject: Is there anywhay to work around there not being an IsNull Function I was woried about declaring a struct, initializing it, and then being able to tell if the init was successfull. IsDeclared would be of no help in this situation, because you could have a struct without having it set up. What is the best way to validate whether a struct has been initialized properly. Brian Eckerman Web Developer __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Is there anywhay to work around there not being an IsNull Function
Right, but if it exists and hasn't been initialized what would be the default value? Or are you not allowed to create a variable without set it's value? -Original Message- From: Matthew R. Small [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 11:30 AM To: CF-Talk Subject: RE: Is there anywhay to work around there not being an IsNull Function Well, if it exists, check for the initialization values. - Matt Small -Original Message- From: Brian Eckerman [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 11:12 AM To: CF-Talk Subject: Is there anywhay to work around there not being an IsNull Function I was woried about declaring a struct, initializing it, and then being able to tell if the init was successfull. IsDeclared would be of no help in this situation, because you could have a struct without having it set up. What is the best way to validate whether a struct has been initialized properly. Brian Eckerman Web Developer __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Is there anywhay to work around there not being an IsNull Function
I thought initialization was the act of creating and assigning a default value for each field within the structure. If you initialize a variable or structure, that means that every field has a value that can be checked. If you just want to see if it exists, then just use isdefined() or parameterexists() or something of that nature. - Matt Small -Original Message- From: Brian Eckerman [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 11:26 AM To: CF-Talk Subject: RE: Is there anywhay to work around there not being an IsNull Function Right, but if it exists and hasn't been initialized what would be the default value? Or are you not allowed to create a variable without set it's value? -Original Message- From: Matthew R. Small [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 11:30 AM To: CF-Talk Subject: RE: Is there anywhay to work around there not being an IsNull Function Well, if it exists, check for the initialization values. - Matt Small -Original Message- From: Brian Eckerman [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 11:12 AM To: CF-Talk Subject: Is there anywhay to work around there not being an IsNull Function I was woried about declaring a struct, initializing it, and then being able to tell if the init was successfull. IsDeclared would be of no help in this situation, because you could have a struct without having it set up. What is the best way to validate whether a struct has been initialized properly. Brian Eckerman Web Developer __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists