Everything You Must Know About ColdFusion Variables
Understanding ColdFusion variables and logic is vital to being able to program in the language. In this tutorial, Jay's second covering ColdFusion, you will learn about the types of ColdFusion variables and how to use them.
Everything You Must Know About ColdFusion Variables - Variable by assigning statements in CFSCRIPT (Page 4 of 7 )
It was mentioned earlier that CFSCRIPT can be used to assign variables. Here is an example of such an assignment. In CSPT.cfm, three numbers are assigned to the variables m, n, and p. There are rules to be followed in using CFSCRIPT, but these will be discussed later. Notice the ColdFusion comment. It has an extra dash, three compared to two in an HTML comment.
The CFSCRIPT code goes here, review the example
<!--- Usage of CFSCRIPT--->
WriteOutput("The value of (5 + 1.5) divided by 2 is: ");
Characteristics of Variables
Variables in ColdFusion are characterized by the following:
Scope of the variable -- This covers where and how long the variable is accessible.
Data type of the variable -- This covers the kind of information that the variable represents, number, strings, Boolean, and so on.