it depends on what the number is

if it's an identifier/autonumber, it's a system generated value so
therefore you control the datatype. so... return it as a string. NULL
is an empty string. ie it could be replaced with a GUID which is a
string anyway. So it's not a "number" but a "numeral"

if you're using the number for calculating however (eg a count or
quantity - the only time I'd return a number is for calculating) then
could NULL be zero?

what is the number is used for?

just my 2c

On 9/17/05, Dawson, Michael <[EMAIL PROTECTED]> wrote:
> No one mentioned this, so I will.  Why not throw an exception when the
> value is not numeric?
> 
> Since your returntype is "numeric", CF itself will throw the exception.
> Can't you just catch that error when it happens?
> 
> M!ke
> 
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of [EMAIL PROTECTED]
> Sent: Friday, September 16, 2005 1:56 PM
> To: [email protected]
> Subject: RE: [CFCDev] <cffunction> return type
> 
> I agree, but nulls are valid options in the database.  I like the
> ability to restrict the return type of a function and think altering
> that to string or any to accommodate nulls is a step backwards and could
> have negative consequences.
> 
> Thanks - Tom
> 
> 
> ----------------------------------------------------------
> 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).
> 
> CFCDev is supported by New Atlanta, makers of BlueDragon
> http://www.newatlanta.com/products/bluedragon/index.cfm
> 
> An archive of the CFCDev list is available at 
> www.mail-archive.com/[email protected]
> 
> 
>


----------------------------------------------------------
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).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

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


Reply via email to