×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Dream Weaver Settings

Dream Weaver Settings to help show unneeded # signs by TruthInSatire
Posted: 12 Apr 05 (Edited 15 Apr 05)

According to Macromedia's Livedocs

Quote:


Macromedia recommends that you use pound signs only when necessary. The following example shows the preferred method for referencing variables.

<cfset SomeVar = Var1 + Max(Var2, 10 * Var3) + Var4>
In contrast, note the following example, which uses pound signs unnecessarily:

<cfset #SomeVar# = #Var1# + #Max(Var2, 10 * Var3)# + #Var4#>


A lot of people use pound signs when they are not needed like in the examples above and below.  There is a setting you can change in dreamweaver to help see these extra hash marks.

If you use Dreamweaver, the below color scheme is what you may see when editing a coldfusion page in "code view".

CODE

<cfif #trim(form.fieldName)# eq "someValue">
<cfoutput>
#form.fieldName#</cfoutput>
</cfif>
In this case the extra hash marks are around the trim function:
#trim(form.fieldName)#

In dreamweaver MX / MX 2004 you can highlight these # signs.

click Edit > Preferences > select Code Coloring > select Coldfusion > click Edit Coloring Scheme > select ColdFusion Script Bracket > click the "B" button to make the selected text bold* > click OK > click ok again on the preferences box.

*You can also change the color if you like, however it also changes ( and ) and [ and ] inside the coldfusion tags.  In my opinion I thought it was more of a change to what I'm used to just to highlight a pound sign.

Your code will now be colored like this making it easy to identify extra unneeded hash marks. The bold pound signs below can/should be removed for best practice.

CODE

<cfif #trim(form.fieldName)# eq "someValue">
<cfoutput>
#form.fieldName#</cfoutput>
</cfif>
The below example shows what it looks like if you change the color for the ColdFusion Script Bracket setting along with making it bold.  I'll use gold.

CODE

<cfif #trim(form.fieldName)# eq "someValue">
<cfoutput>
#form.fieldName#</cfoutput>
</cfif>


Back to Adobe FAQ Index
Back to Adobe Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close