Creating your first Coldfusion Component Step 2
Submitted by Depot Kite on Tue, 2006-03-07 10:28.
Coldfusion Component Step 2
When you use a CFC the name of the function you want to call is used and all the processes in the function is executed. Now I am going to introduce you to the <cfreturn> tag.
Define:
cfreturn: enables you to return a value from the <cffunction> tag
tag: <cfreturn expression>
Example 2
<cfcomponent>
<cffunction name="today returntype="date">
<cfreturn Now()>
</cffunction>
<cffunction name="tommarow" returntype="date">
<cfreturn DateAdd("d",1,Now())>
<cffunction>
</cfcomponent>

Recent comments
11 weeks 3 days ago
11 weeks 3 days ago
14 weeks 6 days ago
15 weeks 4 days ago
15 weeks 4 days ago
17 weeks 5 days ago
30 weeks 4 days ago
30 weeks 4 days ago
30 weeks 6 days ago
31 weeks 7 hours ago