On Mar 19, 2004, at 4:02 PM, Barney Boisvert wrote:
However, this is NOT legal (throws an error about double-declaring local var
'n'):


<cffunction name="foo">
        <cfargument name="n" type="numeric" />
        <cfset var n = "forty two" />
        <cfreturn n & arguments.n />
</cffunction>

Ah, I didn't test it... my bad... so it's just like Java and C++ in that respect (but not C). Hmm, I could've sworn I'd written code like that but I guess my memory is playing tricks on me... Of course, I *shouldn't* have written code like that since it would introduce a name clash which - even if it were legal - would be bad practice! :)


Regards,
Sean

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email.


CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

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

Reply via email to