What is CF Script
CFSCRIPT (ColdFusion) is a server-side scripting language that works with CFML to give you the best of both worlds: an elegant, tag-based syntax whenever you need it and a flexible scripting syntax if you don't.
CFSCRIPT is an instruction to the ColdFusion processing engine to treat a block of code as scripting-based syntax rather than as tag-based syntax.
for example, which loops from 1 to 10, adding each index to a running total:
<cfset thesum="0">
<cfloop from="”1”" index="”i”" to="”10”">
<cfset +="" i="" thesum="TheSum">
Following is the same code expressed in CFSCRIPT’s scripting syntax:
<cfscript>
TheSum = 0;
for(i = 1; i LTE 10; i = i + 1) {
TheSum = TheSum + 1;
}
</cfscript>
CFSCRIPT doesn’t support the ++ syntax for incrementing a variable that may be familiar to you if you have experience with Java, JavaScript, or C++. Look familiar? If you’re having JavaScript déjà vu, that’s normal, because CFSCRIPT is almost identical to JavaScript.
You can learn more What is CF Script?, please read this article
|
About MeSponsorSubscribeSubscribe via RSSSubscribeRecent PostsSubscribeHot LinksSubscribeRecent Jobs
Jobs powered by
Simply
Hired
Live Traffic Feed |
Subscribe to post feed