September 2007
Intermediate to advanced
600 pages
20h 21m
English
When a ColdFusion Component is used, the name of the function to be executed is specified. Any code in that function is processed, and a result is returned back to the calling code. To return data, a <cfreturn> tag is used. Listing 11.4 is a modified version of the previous listing, this time with <cfreturn> tags included in the body.
<!--- This is the introductory CFC ---> <cfcomponent> <!--- Get today's date ---> <cffunction name="today" returntype="date"> <cfreturn Now()> </cffunction> <!--- Get tomorrow's date ---> <cffunction name="tomorrow" returntype="date"> <cfreturn DateAdd("d", 1, Now())> </cffunction> <!--- Get yesterday's date ---> <cffunction name="yesterday" returntype="date"> ... |
Read now
Unlock full access