기본적으로 ColdFusion은 값으로 간단한 유형 (예 : 숫자, 문자열 및 GUID)을 함수에 전달합니다. 참조로 간단한 형식을 전달하고 싶습니다.ColdFusion에서 참조로 간단한 값을 전달할 수 있습니까?
현재 구조체에 간단한 값을 래핑하고 있습니다 (참조로 전달됩니다). 이건 내 문제를 해결하지만, 아주 못생긴 : 나는 오히려이 같은
<!--- TheFunctionName---->
<cffunction name="TheFunctionName">
<cfargument name="OutVariable" type="struct">
<cfset OutVariable.ID = 5>
</cffunction>
<cfset OutVariable=StructNew()>
<cfset TheFunctionName(OutVariable)>
<!--- I want this to output 5--->
<cfoutput>#OutVariable.ID#</cfoutput>
것 :
<!--- TheFunctionName---->
<cffunction name="TheFunctionName">
<cfargument name="OutVariable" passbyref="true">
<cfset OutVariable = 5>
</cffunction>
<cfset TheFunctionName(OutVariable)>
<!--- I want this to output 5--->
<cfoutput>#OutVariable#</cfoutput>