Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

CFScript Reference Manual

New Here ,
Oct 26, 2010 Oct 26, 2010

Does anyone know an URL for a

ColdFusion 9 CFScript Reference Manual?

ColdFusion 9 CFML Reference only contains CFML, not CFScript.

Developing ColdFusion 9 Applications is more of a User Guide,

not a Reference.

Thanks.

myscreenname0345

2.8K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 26, 2010 Oct 26, 2010

While the "Developing ColdFusion 9 Applications" book is generally more of a user guide, the section on CFSCRIPT that it contains is the complete (and only) reference. There simply isn't that much to CFSCRIPT. That section lists all of the operators and expression syntax.

Dave Watts, CTO, Fig Leaf Software

http://www.figleaf.com/

http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on

GSA Schedule, and provides the highest caliber vendor-authorized

instruction at our training centers, online, or onsite.

Read this before you post:

http://forums.adobe.com/thread/607238

Dave Watts, Eidolon LLC
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 26, 2010 Oct 26, 2010

Well there's this:

Developing ColdFusion 9 Applications > The CFML Programming Language > Extending ColdFusion Pages with CFML Scripting:

http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24-7feb.html

But that's about it.  It's quite poorly written, and - as you suggest - not really written like a reference might be used.

But there's really not much to CFScript.  There's a list of what bits of CF functionality are implemented in CFScript here:

http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSe9cbe5cf462523a02805926a1237efcbfd5-7ffe.html

As far as control structures are concerned, it's pretty much the same as in JavaScript:

if (){

}else if(){

}else{

}

switch(){

     case:{

          break;

     }

     default:{

           break;

    }

}

for (expr1; cond; expr2){

}

for (keyName in struct){

}

try {

} catch (type variable){

} catch (any differentVariable){

} finally{

}

That's about it.

CF9 added in stuff for defining CFCs completely in script, and that's covered here:

http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSE99A664D-44E3-44d1-92A0-5FDF8D82B55C.html

--

Adam

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 26, 2010 Oct 26, 2010

Thanks Gentlemen.

I'm looking for things like:

   1. function args

       Ex: cfoutput attributes inlcude: group, groupCaseSensitive, maxRows, query, startRow

       Which (if any) does writeoutput() support?

       And what is the arg order?

   2. Exceptions

       What exception types are thrown by each CFScript function?

   3. Function modifiers

      Are the same ones supported as in Java (e.g. public, private, protected, static, etc.)?

      Do they work exactly the same as in Java?

This must be described somewhere.

Thanks.

myscreenname0345

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 27, 2010 Oct 27, 2010

* writeOutput() is not analogous to any of the complexities of <cfoutput>.  It is purely an analogue of <cfoutput>some string</cfoutput>.

* there's not such thing as a "CFScript function".  All CF functions work equally well in tag-based or CFScript-based code.  You're asking a very broad question here, in that none of the potential exceptions for any of CFML is documented anywhere that I am aware of.  For example what sort of exception does listGetAt() raise when one does this: <cfoutput>#listGetAt("1,2,3", 4)#</cfoutput>. One might expect an ListIndexOutOfBounds exception, but actually it's just a - rather unhelpful - "Expression" exception.  I don't think a lot of thought went into this when CF was developed.

For CFScript-specific constructs - like if() or switch() - the nature of the beast is likely you'll get a compilation error if you've got something wrong: it's unlikely to raise an exception.

* All the function stuff is documented in the link I sent you y/day.  I think there is a slight disconnect in how you are perceiving CFScript vis-a-vis tag-based code.  It's all CFML, and it all adhere's to CFML's implementations of "things" (sorry to use a technical term like that ;-).  So asking whether CFScript adheres to Java concepts is a non-sensical question, because CFScript is purely a syntactical change from tag-based code; it doesn't behave any differently from a functional perspective.  So given a <cffunction> can have access= remote, public, package or private; it's exactly the same in a function defined in CFScript.  It's just the syntax that's different.

CFScript is not a different language from tag-based CFML.  It is just a syntactical alternative.

--

Adam

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 27, 2010 Oct 27, 2010

As Adam describes, there's nothing specific to CFSCRIPT with regard to those items. All built-in CFML functions behave the same way in CFSCRIPT as they do in regular CFML. Any functions you write in CFSCRIPT yourself are going to throw generic exceptions unless you explicitly code them to throw specific exceptions.

Dave Watts, CTO, Fig Leaf Software

http://www.figleaf.com/

http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on

GSA Schedule, and provides the highest caliber vendor-authorized

instruction at our training centers, online, or onsite.

Read this before you post:

http://forums.adobe.com/thread/607238

Dave Watts, Eidolon LLC
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 27, 2010 Oct 27, 2010
LATEST

Thanks Adam, Dave for your help!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources