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.

Building Expressions

Expressions are entered where necessary. Expressions can be passed to a <cfset> statement as part of an assignment, used when displaying text, and passed to almost every single CFML tag (except for the few that take no attributes).

Simple expressions can be used, such as those discussed previously (variables, functions, and combinations thereof). But more complex expressions can be used, too, and expressions can include arithmetic, string, and decision operators. You’ll use these in the next few chapters.

When using expressions, number signs are used to delimit ColdFusion functions and variables within a block of text. So, how would you display the # itself? Look at the following code snippet:

<cfoutput> #1: #FirstName# ...

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