Multi Grid

From Catglobe Wiki
Jump to: navigation, search



Multi Grid

An identifier with array type is created for each Multi Grid question. The array is zero-index based, its size is equal to the number of sub questions. It contains boolean array items, which have the same format and usage like a Multi question.

Example

5713.jpg

if (Q4[0][1])//check if James is considered as Kind

//do something

else if (Q4[2] == [1-3])//check if Maria is considered as Funny or Kind or Relax

//do something

else if (Q4[1] == 4)//check if Peter is considered as Clever

//do something

Each sub question can be assigned value as a multi question.

Example

Q4[0][1] = true;//Jame is kind

Q4[2] = {true, false, false, false}; // Peter is funny

Q4 = {empty, empty, empty};//clear all answers

Q4 = {{true, false, false, false},{false, true, false, false}, {false, false, true, false}};//James is funny, Peter is kind, Maria is relaxed

Back to: Multi