Another point to consider is that sometimes you have no choice but to use the pound signs.
This one bit me recently. <cfparam name="Form.date" default=now()> sets the Form.date variable to "now()". I ended up putting the quotes and the pound signs back in. As for the previous question on doing a cfparam inside of cfscript, I THINK (don't hold me to this) that the only way to do this is: <cfscript> if(not isDefined("FORM.Date")) FORM.Date = Now(); </cfscript> Of course, this uses the example above and would require more code if you wanted to ensure the type of data that was coming in. Steve -----Original Message----- From: Calvin Ward [mailto:[EMAIL PROTECTED] Sent: Friday, June 20, 2003 7:31 AM To: CF-Talk Subject: Re: CFSCRIPT syntax I can add the following snippet to the conversation: Guidelines for using pound signs Follow these guidelines when using pound signs: Use pound signs to distinguish variables or functions from plain text. Surround only a single variable or function in pound signs; for example, #Variables.myVar# or #Left (myString,position)#. However, a function in pound signs can contain nested functions, such as #Left(trim(myString), position)#. Do not enclose complex expressions, such as 1 + 2, with pound signs. Do not use pound signs when using the cfset tag to assign one variable's value to another value. Use pound signs only where necessary, because unneeded pound signs slow processing. ref: http://www.macromedia.com/support/coldfusion/getting_started/using_poundsign s_quotat/using_poundsigns_quotat02.html HTH, Calvin ----- Original Message ----- From: "Matthew Walker" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Thursday, June 19, 2003 10:23 PM Subject: RE: CFSCRIPT syntax > Hi Mark, > > Just to add to Raymond's comments, > > I think the confusion about hashes and quotes comes about from CF tags, > where you DO need them when you are passing a numeric or a variable as an > attribute, i.e. > > <cfquery datasource="#mydsn#" maxrows="#maxrows#"> > > In any other situation, you only need quotes around strings, and you only > need hashes when inserting an expression into a string or cfoutputting > it.... More or less. > > > 4) Can a CFPARAM statement be written in CFSCRIPT? If so, how? > > Take a look at this udf: > http://www.cflib.org/udf.cfm?ID=144 > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4