• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Summary

ColdFusion scripting is an alternative to using CFML and offers a subset of CFML's functionality. <cfscript> code cannot execute CFML tags, and so you cannot use ColdFusion scripting to run queries or speak with external processes other than Java, COM, or CORBA objects. Instead, you use the scripting language primarily for variable assignments, looping, and conditional statements.

Sample Questions

1:Which of the following cannot be achieved in a <cfscript> block? (Select all that apply.)
  1. Variable assignments

  2. Looping

  3. ColdFusion Component invocation

  4. HTTP requests

  5. CORBA object invocation

  6. Custom tag execution

2:Choose the statements that are true.
  1. There are more operators (such as ++ and &&) in scripting than in CFML.

  2. Scripting is capable of doing everything CFML does.

  3. switch and case are available only in <cfscript> blocks.

  4. Scripting allows for do-while looping.

3:What is the output of the following code?
<cfscript>
x=1;
switch(x){
 case 1: {x=2; WriteOutput("World");}
 case 2: {x=1; WriteOutput("Hello");}
}
</cfscript>

  1. Hello World

  2. World Hello World

  3. World

  4. World Hello


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint