Name

select, (deprecated,, use, TERM[ITEM]:DEFAULT) — Select item from term

Synopsis

select ( term TERM ,
  integer ITEM ,
  any DEFAULT );
 
(deprecated, ( term TERM ,
  integer ITEM ,
  any DEFAULT );
 
use ( term TERM ,
  integer ITEM ,
  any DEFAULT );
 
TERM[ITEM]:DEFAULT) ( term TERM ,
  integer ITEM ,
  any DEFAULT );
 

Parameters

term TERM

integer ITEM

any DEFAULT

Description

 Gets the i'th value of the term t. The first value has the index 0. The call select ([1, 2, 3], 1) thus returns 2. Returns the default if the index is invalid or the found value has a diffetent type that default.
Functionality replaced with syntax: term a = `VBox(`VSpacing(2), `Label("string"), `VSpacing(2));
a[1]:`Empty() -> `Label ("string") a[9]:`Empty() -> `Empty ()

Usage

  select (`hirn (true, false), 33, true) -> true