<< Click to Display Table of Contents >> Navigation: User Guide > Project components > Logic definitions introduction |
A logic definition is either true or false. This is sometimes called a "Boolean".
The word "filter" is often used to refer to a logic definition as well as to a filter entry.
A filter entry has a logic definition, and the filter entry itself is said to be true if the logic definition is true, and false if it is not.
A logic definition is some syntax that refers to other entries, for example:
"$Q1/1" would be true if question Q1 has the first response selected.
You do not have to worry about the syntax because there is a menu-driven interface for creating logic definitions using the "Tests" tab page on the Logic definition user control.
Logic definitions can refer to the answers to questions and variables, and also to other filter entries.
Complex logic definitions can be constructed to:
•Test individual values or ranges
•Use negative tests
•Refer to many different entries
•Use "and" and "or" to combine tests
•Use parentheses "(" and ")" to control the order of testing
•Have special tests:
oentry is empty (no answer given)
oonly one answer given to a multi-coded question
omore than one answer given to a multi-coded question
IMPORTANT: there is no automatic priority for the order of calculation; it will be calculated from left to right unless parentheses are used.
Three special single letter logic definitions can be used:
•T meaning "true" for every respondent (everyone passes this test)
•F meaning "false" for every respondent (nobody passes this test)
•R meaning "reject"; only used in variables
For full details about logic definitions, see Reference Manual, Definitions, Logic definitions.
Logic definitions are created using a User control.