Home Ajax Ajax PHP SQLite Wordpress XML

Wednesday, June 17, 2009

What is CF Script

0 comments

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

Comments
0 comments
Do you have any suggestions? Add your comment. Please don't spam!
Subscribe to post feed

About Me

Sponsor

SubscribeSubscribe via RSS

SubscribeRecent Posts

SubscribeHot Links

SubscribeRecent Jobs

Live Traffic Feed