Content deleted Content added
Noahfgodard (talk | contribs) No edit summary |
Noahfgodard (talk | contribs) added wikilinks and removed "underlinked" tag |
||
Line 1:
{{More citations needed|date =November 2006}}
'''CFScript''' is an extension of [[ColdFusion Markup Language|CFML]] on the ColdFusion platform. CFScript resembles [[JavaScript]]. Some ColdFusion [[Software Developers|developers]] prefer it since it has less visual and typographical overhead than ordinary CFML.{{Clarify|reason=|date=March 2020}}
== Usage ==
It is considered best practice to write ColdFusion Components and all business logic in CFScript and to use [[CFML]] only in .cfm files amongst [[HTML]].
<source lang="cfm">
<cfscript>
Line 55 ⟶ 52:
== Syntax ==
Since ColdFusion 8, CFScript has supported [[Syntax (programming languages)|syntax]] abbreviations that are common in many other programming languages, such as "++", "<=" and "+=".<ref>{{Cite web|url=https://www.bennadel.com/blog/741-learning-coldfusion-8-all-hail-the-new-operator.htm|title=Learning ColdFusion 8: All Hail The New ++ Operator|last=Nadel|first=Ben|date=May 31, 2007|website=|archive-url=|archive-date=|access-date=}}</ref>
=== Arithmetic operators ===
Line 174 ⟶ 171:
Although CFScript and JavaScript are similar, they have several key differences. The following list identifies CFScript features that differ from JavaScript:
* CFScript uses ColdFusion
*[[Variable declaration|Variable declarations]] (var keyword) are only used in user-defined functions and threads.
* CFScript is not case sensitive.
* All statements end with a semicolon, and line breaks in the code are ignored.
|