On Apr 15, 2004, at 3:38 PM, Roland Collins wrote:
<CFFUNCTION NAME="getVariablesScope" RETURNTYPE="struct" OUTPUT="false" ACCESS="private">
����������� <CFSCRIPT>
����������������������� var stReturn = StructNew();
����������������������� var oVar = "";


����������������������� for (oVar IN variables) {
����������������������������������� if (oVar IS NOT "this" AND NOT IsCustomFunction(variables[oVar]))
����������������������������������������������� stReturn[oVar] = variables[oVar];
����������������������� }


 ����������������������� return stReturn;
����������� </CFSCRIPT>
</CFFUNCTION>

Don't forget that this will copy arrays and simple variables by value but structs and objects by reference. That may or may not matter depending on what you want to do with the resulting struct...


Sean A Corfield -- http://www.corfield.org/blog/

"There are no solutions, only trade-offs."
-- Thomas Sowell

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