Help Library

The “Switch” Verb allows for the selection of the first Markup_Element with a “Case” Verb to be compiled and all others ignored.  The “Switch_Default” is compiled if all “Case” Verbs fail.

Case Verbs can be of differing groups.  For example the first could be “B ranch_Kind_Case” and the next “Fact_Value_Case”.

Switch Verb Compilation

When a Markup_Element has the “Switch” Verb its Build_Item’s “Switch” value is initialize to “Armed”.  Subsequent descendant Markup_Elements can use various “Case” Verbs.

When a Markup_Element has a “Case” Verb and Verb’s ancestor Compiliation_Item’s “Switch” value already is “Found” the related Build_Item’s “Switch” value is set to “Skip” and the Markup_Element is not tested or compiled.

Otherwise when the Verb’s result is false the Markup_Element is not compiled and the related Build_Item’s “Switch” value is set to “Skip”.

When the Verb’s result is true the related Build_Item’s “Switch” value is set to “True”, the ancestor Compiliation_Item’s “Switch” value is set to “Found”, the related Build_Item’s “Switch” value is set to “Used”, and Markup_Element is compiled.

When a descendant Markup_Element has the “Switch_Default” Verb and the ancestor Compiliation_Item’s “Switch” value is “Armed” the related Build_Item’s and the ancestor Compiliation_Item’s “Switch” value is set to “Used”, and the Markup_Element is compiled.

Example

<Row Compile="Switch">

<Cell Compile="B ranch_Kind_Case=Service" ... />

<Cell Compile="B ranch_Kind_Case=Time_Year" ... />

<Cell Compile="Switch_Default" ... />

</Row>

ShofarPortfolio™ ● We don’t know Your Stuff
Help Library

Core

Dev

Kind

Kit

Leaf

Map

Message

Net

Overview

Packet

Primitives

Run

Secure

Session

Site

Socket

Sprint

Stack

Tool

The Tree

Primitives

Belt

Bond

Branch

Build

Fact

File

Glob

ID

Image

Leaf

Log

Markup

Money

Object

Package

Parse

Phrase

Render

Sprint

Stack

String

Sum

SVG

Time

Tray

Unit

Verb

Build

Object

Switch

Build_Tray

Build