O'Reilly logo

Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started by Charlie Arehart, Raymond Camden, Ben Forta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Prefixes

ColdFusion supports many variable types, and you’ll become very familiar with them as you work through this book. For example, local variables (the type you just created) are a variable type. Submitted form fields are a variable type, as are many others.

ColdFusion variables can be referenced in two ways:

  • The variable name itself.

  • The variable name with the type as a prefix.

For example, the variable firstName that you used a little earlier is a local variable (type VARIABLES). That variable can be referred to as firstName (as you did previously) and as VARIABLES. firstName. Both are valid, and both will work (you can try editing file hello6.cfm to use the VARIABLES prefix to try this).

So, should you use prefixes? Well, there ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required