Jimmy, I've seen a lot of people that do this....

<cffunction name="someFunc" returnType="query" output="false">
        <cfargument name="foo" type="string" required="true" />
        <cfscript>

                // do cfscript style code here

        </cfscript>
</cffunction>


...and then you sort of get the best of both words.  Assuming you're on
CMFX and not CF 5.0, the performance hit in switching between CFML and
CFscript isn't an issue since it all gets compiled down to byte code
anyway.  Though I do think there is a slight performance hit in adding
the "type=" code in your cfargument tag, but I've never had it be an
issue.

Hth





Nolan Erck
Web Developer/Programmer
Schools Financial Credit Union
(916) 569-5409 Office
(916) 569-2024 Fax
www.schools.org

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Jimmy Glass
Sent: Wednesday, July 19, 2006 6:13 PM
To: [email protected]
Subject: [CFCDev] Typing Arguments of a Function

Morning,
Personally, I feel that CFSCRIPT code is much prettier than a tag based
CFC.
But, my intent is not to spark a debate on the elegance of using tags.
In
instances where my functions require a tag, I generally use a CFC that
I've
built which contains functions that interface with the tag. CFQUERY,
CFDUMP,
etc. I'm sure this is a rather common technique. 

What I do like about the CFFUNCTION/CFARGUMENT tags are the ability to
explicitly define the return type and output of a function, and the data
types of the arguments. To my knowledge, this is not possible when
defining
a function w/ CFSCRIPT. 

Does anyone have a work around, or a way of accomplishing this in
CFSCRIPT?

Thanks,
Jimmy G 






----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of
the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
(www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]




The information contained in this e-mail is confidential and may contain 
privileged information exempt from disclosure under applicable law. The 
information is intended only for the use of the individual or entity to which 
it is addressed. If you are not the intended recipient, employee, or agent 
responsible to deliver it to the intended recipient, you are hereby notified 
that any use, dissemination, distribution, or copying of this communication is 
strictly prohibited. If you have received this e-mail in error, please delete 
the message from your computer and immediately notify the sender by telephone 
(you may call collect) at 916-569-5400 or by e-mail to [EMAIL PROTECTED] Thank 
you.


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]


Reply via email to