In AskiaScript, the following functions relating to sets are available.
| Function | Description |
|---|---|
| IsIncludedIn |
Use this function to verify that the values of a set are also contained in another set. The function will examine the values of a set and compare them with those contained in its set of reference. When the set's value(s) are present in the set of reference, the function returns the value 1, otherwise it returns the value 0. For example: ??Q1??IsIncludedIn??Q2?? if Q1={2;3} and Q2={2;3;4;5}, the function will return 1, because the values in Q1 {2;3} are also present in Q2. {1;2;3}IsIncludedIn??Q1?? if Q1={1;2;3}, the function will return 1 (true), because the specified set is present in Q1. if Q1={1;2;4}, the function will return 0 (false), because the exact set is not present. |
|
Size() |
Use this function to retrieve the number of values contained in a set. It enables you to determine the mean number of answers given to a multi-coded closed question. For example, if Q1 is a multi-coded closed question: Size(??Q1??) if the respondent selected three response items, the function will return 3. |
| To |
Use this function to specify a range of values without listing every individual value within the range, thereby saving time and improving the legibility of your scripts. For example: {5 To 15} refers to the same set as: {5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15}. |
| Union |
Use this function to concatenate the values contained in two different sets. For example: ??Q1??Union??Q2??={2;4;3;7} if Q1={2;4} and Q2={3;7}, the function will return 1 (true). |