CFScript

From Wikipedia, the free encyclopedia

CFScript is an extension of CFML on the ColdFusion platform. CFScript resembles JavaScript. Some ColdFusion developers prefer it since it has less visual and typographical overhead than ordinary CFML; only the actual changes are represented in the code (whereas normal CFML would involve CFSET tags at every line).

All CFScript code must be contained within a CFScript tag pair, as follows:

<cfscript>
    xParam = 115;
    yParam = 200;
    color = 'FFCC99';
</cfscript>

While many ColdFusion tags have exact CFScript analogies, there are quite a few tags that do not. These include both complex tags that would be difficult to duplicate and simple tags that are easy to imitate (using ColdFusion UDF's):

Complex:

<cfquery>
<cffile>
<cfdirectory>

Simple:

<cfdump>
<cfthrow>