Referenceboolean

<boolean>

<boolean> is a Logic component that renders the boolean value of true or false of the enclosed expression.

Attributes and Properties

Attributes for <boolean>
AttributeTypeValues
allowedErrorInNumbers = "…"number
allowedErrorIsAbsolute = "…"boolean"true" "false"
caseInsensitiveMatch = "…"boolean"true" "false"
expandOnCompare = "…"boolean"true" "false"
includeErrorInNumberExponents = "…"boolean"true" "false"
matchBlanks = "…"boolean"true" "false"
matchByExactPositions = "…"boolean"true" "false"
numPeriodicSetMatchesRequired = "…"integer
numSignErrorsMatched = "…"number
simplifyOnCompare = "…"text"none" "full" "numbers" "numberspreserveorder"
symbolicEquality = "…"boolean"true" "false"
unorderedCompare = "…"boolean"true" "false"
Props for <boolean name="b">
PropertyType
$b.allowedErrorInNumbersnumber
$b.allowedErrorIsAbsoluteboolean
$b.caseInsensitiveMatchboolean
$b.disabledboolean
$b.expandOnCompareboolean
$b.fixedboolean
$b.fixLocationboolean
$b.hiddenboolean
$b.includeErrorInNumberExponentsboolean
$b.matchBlanksboolean
$b.matchByExactPositionsboolean
$b.numPeriodicSetMatchesRequiredinteger
$b.numSignErrorsMatchednumber
$b.simplifyOnComparetext
$b.symbolicEqualityboolean
$b.texttext
$b.unorderedCompareboolean
$b.valueboolean

Example: <boolean> value of an equation

A <boolean> component is used to render whether an equation is true or false for a user-supplied response


Example: <boolean> value of a geometric property

A <boolean> component is used to render whether a statement regarding the geometric slope of a named <line> is true or false. Adjust the slope of the line to affect the <boolean>.


Example: Constructing compound <boolean> expressions

Multiple named <boolean> components can be combined to create more complex boolean expressions.


Attribute Example: symbolicEquality

Comparing two values with the symbolicEquality attribute switches demands exact syntactical equality.


Attribute Example: expandOnCompare

Comparing two values with the expandOnCompare and symbolicEquality attributes allows expressions that are equivalent after expanding to evaluate to true.


Attribute Example: simplifyOnCompare

Comparing two values with the simplifyOnCompare and symbolicEquality attributes allows expressions that are equivalent after simplifying to evaluate to true.


Attribute Example: unorderedCompare

When multiple values are compared within a single <boolean> tag, the default behavior is to match the order of the sequenced values. If order is irrelevant, use the unorderedCompare attribute.


Attribute Example: matchByExactPositions

When multiple responses are evaluated by comparison with a vector of correct values inside a <boolean>, the matchByExactPositions attribute enforces a strict order onto the validation. Only correct values in the correct answer blanks will allow the <boolean> to evaluate to true.


Attribute Example: allowedErrorInNumbers

The allowedErrorInNumbers attribute may be used to specify the acceptable error of an approximate response when comparing numerical values. By default, the error is specified as a fractional value.


Attribute Example: allowedErrorIsAbsolute

To specify an allowed error with a specific numerical value (rather than as a fraction of the correct response), use the allowedErrorIsAbsolute attribute in combination with the allowedErrorInNumbers attribute.


Attribute Example: caseInsensitiveMatch

Use the caseInsensitiveMatch attribute if capitalization is not relevant for comparison.


Attribute Example: matchBlanks

Use the matchBlanks attribute to accurately compare two expressions containing blanks.


Property Example: value

The value property of a named <boolean> returns its value of true or false.


Property Example: text

The text property of a named <boolean> returns the text value of true or false.


Property Example: Attributes as properties 1

The above listed attributes of a <boolean> are also available as properties.


Property Example: Attributes as properties 2

The above listed attributes of a <boolean> are also available as properties.