Alright, a couple of things to note... First, Dim is for declaring variables, but if you don't specify a type then the variable is declared as a variant. Thus, instead of...
Dim x x = "" You should use... Dim x as String x = "" Next, to check to see if a variable is null you would use the following... If x Is Nothing Then ... End If So, I think the code you are looking for is... If x Is Nothing Then X = "" End If Matt Liotta President & CEO Montara Software, Inc. http://www.montarasoftware.com/ 888-408-0900 x901 > -----Original Message----- > From: Scott Mulholland [mailto:[EMAIL PROTECTED]] > Sent: Monday, September 09, 2002 2:04 PM > To: CF-Talk > Subject: RE: VB > > But foo is only "" if it does not already exist. Benoit was correct in > his understanding of what I am looking for. > > -----Original Message----- > From: Tony Carcieri [mailto:[EMAIL PROTECTED]] > Sent: Monday, September 09, 2002 3:56 PM > To: CF-Talk > Subject: RE: VB > > > Hmm, maybe I am having a brainfart. > > If I do: > <cfparam name="foo" default=""> > > doesn't that set the value to "" ? If so, then doing what I suggested in > VB should work the same. Again, my brain ain't working today. > > HTH, > T > > -----Original Message----- > From: Benoit Martin [mailto:[EMAIL PROTECTED]] > Sent: Monday, September 09, 2002 4:48 PM > To: CF-Talk > Subject: RE: VB > > > Unfortunately I don't know the answer but I don't think that what you > proposed would work. This will initialize the var to "" no matter what. > In my understanding Scott is looking for code that would declare the var > only if it's not already defined > > Ben > > -----Original Message----- > From: Tony Carcieri [mailto:[EMAIL PROTECTED]] > Sent: Monday, September 09, 2002 10:24 AM > To: CF-Talk > Subject: RE: VB > > > Dim only declares the var.. > > Try this: > Dim x > x = "" > > > -----Original Message----- > From: Robert Everland [mailto:[EMAIL PROTECTED]] > Sent: Monday, September 09, 2002 4:17 PM > To: CF-Talk > Subject: RE: VB > > > Isn't it DIM > > Robert Everland III > Web Developer Extraordinaire > Dixon Ticonderoga Company > http://www.dixonusa.com > > -----Original Message----- > From: Scott Mulholland [mailto:[EMAIL PROTECTED]] > Sent: Monday, September 09, 2002 4:15 PM > To: CF-Talk > Subject: OT: VB > > > Anyone know if there is an equivalent of what cfparam in VB. > I need to set a default for a variable in case it does not exist. > > Thanks, > Scott > > > > > > > ______________________________________________________________________ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm 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