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)
Created page with "==== 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 ca..."
 
Nguyenduyan (talk | contribs)
Line 1: Line 1:
==== QAS_flushCallStack  ====
==== 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_getCallStackInfo.
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.
Furthermore flushing the call stack, will cause an answer sheet context shift to occur, setting the current answer sheet to the initial answer sheet.
Line 15: Line 15:
'''Return type'''
'''Return type'''


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


'''Example 1'''
'''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();
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.





Revision as of 08:19, 16 April 2012

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