<or>

Logical OR: true when at least one child boolean value is true

<or> is a Logic component that functions as the boolean operator or applied to its enclosed <boolean> references.

Attributes and Properties

Attributes for <or>

Other (12)
allowedErrorInNumbers

number. Default value: 0. Maximum allowed numeric error when comparing numbers.

allowedErrorIsAbsolute

boolean. Default value: false. Whether allowedErrorInNumbers is interpreted as an absolute (rather than relative) tolerance.

caseInsensitiveMatch

boolean. Default value: false. Whether text comparisons ignore letter case.

expandOnCompare

boolean. Default value: false. Whether to expand math expressions before comparing.

includeErrorInNumberExponents

boolean. Default value: false. Whether the allowed numeric error also applies to numbers in exponents.

matchBlanks

boolean. Default value: false. Whether unfilled blanks in a math expression count as a match.

matchByExactPositions

boolean. Default value: false. Whether to match list values by exact position rather than by content.

numPeriodicSetMatchesRequired

integer. Default value: 3. Number of consecutive elements of a periodic set required to count as a match.

numSignErrorsMatched

number. Default value: 0. Maximum number of sign errors that still count as a match.

simplifyOnCompare

keyword. Level of simplification applied to math expressions before comparing.

ValueDescription
none (default)No simplification is applied before comparing.
fullFully simplify both expressions before comparing.
numbersSimplify numeric subexpressions only, leaving symbolic structure intact.
numbersPreserveOrderLike numbers, but does not reorder commutative operands.
normalizeOrderReorder commutative operands into a canonical form without simplifying values.
symbolicEquality

boolean. Default value: false. Whether children compared via this boolean use symbolic equality.

unorderedCompare

boolean. Default value: false. Whether order is ignored when comparing list-like values.

Common to all components (9)
copy

reference. Create an independent copy of another component by reference. Enter a references a $name.

disabled

boolean. Default value: false. Whether this component is disabled and cannot be interacted with.

extend

reference. Extend another component by reference, inheriting its children and attributes. Enter a reference as $name.

fixed

boolean. Default value: false. Whether this component's value is fixed and cannot be modified.

fixLocation

boolean. Default value: false. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).

hide

boolean. Default value: false. Whether to hide this component from the rendered output.

isResponse

boolean. Default value: false. Whether this component is treated as a response for the purposes of assessment.

name

text. The name used to reference this component from elsewhere in the document.

styleNumber

integer. Default value: 1. The style number used to select this component's visual styling from the available style definitions.

Properties for <or name="o">

Other (18)
$o.allowedErrorInNumbers

number. Maximum allowed numeric error when comparing numbers.

$o.allowedErrorIsAbsolute

boolean. Whether allowedErrorInNumbers is interpreted as an absolute (rather than relative) tolerance.

$o.caseInsensitiveMatch

boolean. Whether text comparisons ignore letter case.

$o.disabled

boolean. Whether this component is disabled and cannot be interacted with.

$o.expandOnCompare

boolean. Whether to expand math expressions before comparing.

$o.fixed

boolean. Whether this component's value is fixed and cannot be modified.

$o.fixLocation

boolean. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).

$o.hidden

boolean. Whether this component is hidden from the rendered output.

$o.includeErrorInNumberExponents

boolean. Whether the allowed numeric error also applies to numbers in exponents.

$o.matchBlanks

boolean. Whether unfilled blanks in a math expression count as a match.

$o.matchByExactPositions

boolean. Whether to match list values by exact position rather than by content.

$o.numPeriodicSetMatchesRequired

integer. Number of consecutive elements of a periodic set required to count as a match.

$o.numSignErrorsMatched

number. Maximum number of sign errors that still count as a match.

$o.simplifyOnCompare

text. Level of simplification applied to math expressions before comparing.

$o.symbolicEquality

boolean. Whether children compared via this boolean use symbolic equality.

$o.text

text. The boolean rendered as a text string ("true" or "false").

$o.unorderedCompare

boolean. Whether order is ignored when comparing list-like values.

$o.value

boolean. The boolean result of applying this operator to its child boolean values.

Common to all components (4)
$o.doenetML

text. The DoenetML source code that produced this component.

$o.hide

boolean. Whether to hide this component from the rendered output.

$o.isResponse

boolean. Whether this component is treated as a response for the purposes of assessment.

$o.styleNumber

integer. The style number used to select this component's visual styling from the available style definitions.

Examples

Example: <or> in a <boolean>

The <or> component functions as the boolean operator or, and checks to see whether any of the enclosed <boolean> references are true.


Example: <or> in an <award>

An <or> component is used to construct a compound boolean from three referenced <boolean> components within an <award>.