The Cfscript Language; Comments; Variables; Expressions - MACROMEDIA COLDFUSION 5-DEVELOPING Develop Manual

Table of Contents

Advertisement

The CFScript Language

The CFScript Language

This section explains the syntax of the CFScript language.

Comments

Comments in CFScript blocks begin with two forward slashes (//) and end at the line
end. You can also enclose CFScript comments between /* and */. Note that you
cannot nest /* and */ inside other comment lines.

Variables

Variables can be of any ColdFusion type, such as numbers, strings, arrays, queries,
and COM objects. You can read and write variables within the script region.

Expressions

CFScript supports all CFML expressions. CFML expressions include operators (such
as +, -, EQ, and so on), as well as all CFML functions.
For information about CFML expression, operators, and functions, see the CFML
Reference.
Note
You cannot use CFML tags in CFScript.

Statements

In CFScript, semicolons define the end of a statement. Line breaks are insignificant.
Enclose multiple statements in curly braces to group them for use in an expression:
{ statement; statement; statement; }
The following statements are supported in CFScript:
Assignment: lval = expr ;
lval can be a simple variable, an array reference, or a member of a structure. For
example:
x = "positive";
y = x;
a[3]=5;
structure.member=10;
CFML expression: expr ;
StructInsert(employee,"lastname",FORM.lastname);
245

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION 5-DEVELOPING and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Coldfusion 5

Table of Contents