Toggle menu
862
3.8K
30.2K
279.1K
Catglobe Wiki
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

QAS flushCallStack: Difference between revisions

From Catglobe Wiki
Nguyenduyan (talk | contribs)
No edit summary
 
(4 intermediate revisions by one other user not shown)
Line 20: Line 20:


There are 3 questionnaires jumping from A(6432)--> B(6433)--> C(6458). Users put the following CGS in a dummy question on C
There are 3 questionnaires jumping from A(6432)--> B(6433)--> C(6458). Users put the following CGS in a dummy question on C
 
<source lang="javascript">
aray cs=QAS_flushCallStack();
aray cs=QAS_flushCallStack();


//returned an answer sheet call stack with 2 stack frames
/*returned an answer sheet call stack with 2 stack frames
 
{90462158,{90462158,90462159,90462160},{{{6432,90462158,D_returnBack},{6433,90462159,Q1}},{{6433,90462159,D_returnBack},{6458,90462160,Q1}}}}
{90462158,{90462158,90462159,90462160},{{{6432,90462158,D_returnBack},{6433,90462159,Q1}},{{6433,90462159,D_returnBack},{6458,90462160,Q1}}}}  
The call stack is flushed, and an answer sheet context shift takes place so that the remainder of the script is executed with the initial answer sheet set as the current answer sheet in the answer sheet context.*/
 
</source>
The call stack is flushed, and an answer sheet context shift takes place so that the remainder of the script is executed with the initial answer sheet set as the current answer sheet in the answer sheet context.
 
 


'''Availability'''
'''Availability'''

Latest revision as of 09:35, 3 January 2019

QAS_flushCallStack

This function makes it possible for the script writer to decide exactly when the answer sheet call stack should be flushed, and upon flusing the call stack an array is returned with exactly the same structure as the array returned from the QAS_getCallStack

Furthermore flushing the call stack, will cause an answer sheet context shift to occur, setting the current answer sheet to the initial answer sheet.

Syntax

QAS_flushCallStack()

Arguments

No

Return type

array of answer sheet call stack (exactly the same structure as the array returned from the QAS_getCallStack)

Example

There are 3 questionnaires jumping from A(6432)--> B(6433)--> C(6458). Users put the following CGS in a dummy question on C

aray cs=QAS_flushCallStack();

/*returned an answer sheet call stack with 2 stack frames
{90462158,{90462158,90462159,90462160},{{{6432,90462158,D_returnBack},{6433,90462159,Q1}},{{6433,90462159,D_returnBack},{6458,90462160,Q1}}}}
The call stack is flushed, and an answer sheet context shift takes place so that the remainder of the script is executed with the initial answer sheet set as the current answer sheet in the answer sheet context.*/

Availability

Version 5.9.5