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

Defining components and functions in CFScript

Explorer ,
Jun 21, 2012 Jun 21, 2012
TOPICS
Documentation
1.1K
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 Beginner ,
Jun 21, 2012 Jun 21, 2012

The order of the parameters for writedump in the last code is wrong.

The correct syntax is the following according to the document.

writedump(var, output, format, abort, label, metainfo, top, show, hide, keys, expand, showUDFs);

So it should be something like writedump(myquery, "", "html", true); instead of writedump(myquery, false, html, name);.

In the second paragraph from the last, where it says "you can add an empty value" should be "you can add an empty string."

The last line should be writedump(myquery, "browser"); instead of writedump(myquery, html); since there is no html option for the second parameter output.  Although the second parameter in this case is optional since the default value for output is browser.

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 20, 2012 Oct 20, 2012
LATEST

In one of the examples above, the function mistakenly uses a paren where it needs an open brace. See the end of the second line below, where I have corrected it:

public void function foo(String n1=10)

description="does nothing" hint="overrides hint" {

WriteOutput("Method foo() called
Parameter value is " & n1);


/Charlie (troubleshooter, carehart. org)
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