Every CF developer is intimately familiar with the code. I was recently re-writing something that was entirely CfScript based, apart from a large chunk of 'IFS' in the middle of the template. So I thought I'd re-write it into CfScript. Turns out its very easy!
ColdFISH is developed by Jason Delmore. Source code and license information available at coldfish.riaforge.org
<cfscript>
IF (condition is met)
action code;
</cfscript>
1<cfscript>
2 IF (condition is met)
3 action code;
4</cfscript>
Pretty straight forward. Looks very similar to the if-else statement.
ColdFISH is developed by Jason Delmore. Source code and license information available at coldfish.riaforge.org
<cfscript>
IF (condition is met)
action code;
ELSE
action other code;
</cfscript>
1<cfscript>
2 IF (condition is met)
3 action code;
4 ELSE
5 action other code;
6
7</cfscript>
Enclose the actionable code in {} and it will perform many 'stacked' functions.
ColdFISH is developed by Jason Delmore. Source code and license information available at coldfish.riaforge.org
<cfscript>
IF (condition is met)
{
action code;
action more code;
}
</cfscript>
1<cfscript>
2 IF (condition is met)
3 {
4 action code;
5 action more code;
6 }
7</cfscript>
I think I actually prefer this way of writing the logic, as its much closer in syntax to Action Script.
There are no comments for this entry.
[Add Comment] [Subscribe to Comments]