Logical operators

In AskiaScript, the following logical operators are available.

operator description
And

Use this operator to define statements which are based on a specific combination of two or more variables.

For example:

??Q1??=1 And ??Q2??=1

This expression includes individuals who have answered 1 at Q1 and 1 at Q2.

False

This operator test whether the expression is not true. You can use it to qualify a statement, thereby enabling you to save time and increase clarity when defining conditions.

For example, the two following statements are equivalent, but the use of false simplifies the first one:

Negative statement: (??Q1??=2 And ??Q2??=5)=False

Positive statement: (??Q1??=1 Or ??Q1??=3 Or ??Q1??=4 Or ??Q1??=5) And (??Q2??=1 Or ??Q2??=2 Or ??Q2??=3 Or ??Q2??=4)

Not

Use this function to negate a statement.

This function follows the same logic as statements qualified with the operator False.

For example:

Not(??Q1??=1) is the equivalent of writing: (??Q1??=1)=False

Or

Use this operator to define a condition based on two or more interchangeable/equivalent statements.

For example:

??Q1??=1 Or ??Q2??=5

True

Use this operator to test the validity of an expression. For example:

(??Q1??=2 And ??Q2??=5)=True

The above expression tests whether a respondent answered 2 at Q1 and 5 at Q2.

However, a condition is True by default, so qualifying this proposition with =True is redundant.

 

(??Q1??=2 And ??Q2??=5)True

would be the same as:

(??Q1??=2 And ??Q2??=5)=False

Create your own Knowledge Base