switch

An input to a logic circuit that the reader flips by clicking it.

switchNode
On this page
Two switches, A on and B off, feeding an OR gate whose lamp is lit.Two switches, A on and B off, feeding an OR gate whose lamp is lit.

#Attributes

valueAnimatable
Its level, 0 or 1.
Default0
fixed
Keeps the reader from flipping it; its knob carries a padlock.
Defaultfalse
hiddenAnimatable
Declared but not drawn, taking no room; its level still drives what it is wired to.
Defaultfalse

#Derived attributes

Computed while the element renders — read one with #id.name in attribute position or {{#id.name}} in prose, never set.

levelDerived
Where it stands, 0 or 1, as the reader or a cue last left it.

#Allowed content

Body { }The switch's label, rich inline; further lines sit beneath it

#Allowed in

#Examples

switch#a{$A$}
switch#s{Set}(value: 0 !cue.to{1}(at: 1); fixed)

#Notes

  • Drawn as a toggle at the end its wire leaves: when it is on, the knob is over to the right and the track lit in the circuit's high: hue.
  • The body is its label, set beside the toggle with its level beneath.

Last updated