Skip to Main Content
Programming ColdFusion MX, 2nd Edition
book

Programming ColdFusion MX, 2nd Edition

by Rob Brooks-Bilson
August 2003
Intermediate to advanced content levelIntermediate to advanced
1140 pages
68h 45m
English
O'Reilly Media, Inc.
Content preview from Programming ColdFusion MX, 2nd Edition

Chapter 19. Scripting

When ColdFusion 4.0 was released, it introduced a new server-side scripting language called CFScript. CFScript is similar in appearance to JavaScript and allows you to write sections of code in your templates using a more concise format than tag-based CFML. CFScript isn’t meant to replace the CFML language; it just provides you with a choice of styles for coding your pages. ColdFusion 5.0 introduced developers to user-defined function. Now, in ColdFusion MX, CFScript adds the ability to trap and handle errors with try/catch constructs. Those used to programming in JavaScript will find the CFScript constructs quite familiar. This chapter covers everything you need to know about the CFScript language, along with examples.

CFScript-based user defined functions (UDFs) were added to the ColdFusion language in Version 5. This functionality allows you to use CFScript to write custom functions that can be used just like any of ColdFusion’s built-in functions. To facilitate this, three additional CFScript statements, function, var, and return, were added to the language. These statements are covered in detail in Chapter 20. For now, all you need to know is that they are considered reserved words in CFScript.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming ColdFusion

Programming ColdFusion

Rob Brooks-Bilson

Publisher Resources

ISBN: 0596003803Supplemental ContentErrata Page