Using dynamic functions (IIf(), DE(), and Evaluate()) makes it possible to write powerful and highly reusable code in small, easy-to-manage code blocks.
Sample Questions
1:
Choose all the statements that are true.
The DE() function is always used to display output.
The DE() function stops ColdFusion from processing expressions.
DE() and IIf() can be used together.
The letters in DE() stand for do evaluation.
2:
What will be the output of the following code?
<cfoutput>#IIf(1 is 1,"Evaluate(1,2,3)","'Hello'")#</cfoutput>
1
2
3
Hello
3:
What does the following code do?
<cfset x="Array"> <cfset Evaluate("p = " & x & "New(1)")>
Creates an array named x.
Creates an array named p.
The code does not work.
None of the above.
4:
In the code below, what does z equal?
<cfset x="y"> <cfset y="x"> <cfset z = IIf(x is y,DE(x),x)>