Answer to Question #45860 in Action Script | Flash | Flex | ColdFusion for Jonathan Bare

Question #45860
// TASK C1.1: Explain the purpose of the '&' in a parameter.
// TASK C1.2: Explain what the program would do if the '&' was omitted in
// the initialiseStack() function header,
1
Expert's answer
2014-09-12T08:32:46-0400
Problem.
// TASK C1.1:Explain the purpose of the '&' in a parameter.
// TASK C1.2: Explain what the program would do if the '&' was omitted in
// the initialiseStack() function header,
Remark. I suppose that it is C++ question, as in Action Script ‘&’ meansconcecatnation of the parameters in URL.
Solution.

An ampersand sign (&), known as referenceoperator, returns the address ofthe variable.
Hence when the argument of the function is &variable, then we pass theaddress of the variable. Thereforeif we modify the variable in the body of the function, then variable will be
modified, as a global variable. If sign is omitted, then variable will be
modified, as a local variable.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS