Here I come up with question about Reserved words. As per my knowledge a keyword can not be a variable.
I've faced a issue about passing reserved word string as a argument in both script based code but not face any error while wrote a same code in tag based. My question here is , I passed argument name as For.If it's reserved word mean we could not able to use both tag & script based right. How the reserved word accept in tag based code ? Correct me if I'm wrong understood anything.
FYR : I've attached my code and successful resule for tag based code and error for script based code.
<cfset testCall = callFunc( a=10,For=20)>
Out put :#testCall#
<cfscript>
testCall = callFunc( a=10,For=20);
writeDump(testCall);
</cfscript>
<cffunction name="callFunc" access="public" returntype="Any">
<cfargument name="a" required="true">
<cfargument name="For" required="true">
<cfreturn ARGUMENTS.a * ARGUMENTS.For>
</cffunction>
Output : 200 ( This is an tag based output )
The below issue is script based code,
Could any one know why it's was happened ? Or correct me if I'm wrong understood. Thanks in advance !