O'Reilly logo

Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started by Charlie Arehart, Raymond Camden, Ben Forta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Functions

This is where it starts to get interesting. CFML (the ColdFusion Markup Language) is made up of two primary language elements:

  • Tags. These perform operations, such as accessing a database, evaluating a condition, and flagging text for processing.

  • Functions. These return (and possibly process) data and do things such as getting the current date and time, converting text to uppercase, and rounding a number to its nearest integer.

Writing ColdFusion code requires the use of both tags and functions. The best way to understand this is to see it in action. Here is a revised hello page. Type Listing 8.2 in a new page, and save it as hello2.cfm in the ows/8 directory.

Listing 8.2. hello2.cfm
<html> <head> <title>Hello 2</title> </head> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required