isCombined (schema -- isCombined)
Inputs
schema: Object or Ref object whose dereferenced schema is tested for the Struct group.
Outputs
isCombined is a dereferenced-schema predicate. It tests whether the dereferenced schema is any Struct.
isCombined reports the Struct schema group: a Dict, List, or Tuple, including the empty (). It is a schema-group test, not a field-count or nonempty-container test; current value contents do not participate.
Behavior
- Dict, List, and Tuple schemas produce
TRUE, including the empty Tuple(). - All non-Struct schemas produce
FALSE.
Example
{} 0 {} [
dict: { x: 1; };
"-- Dict and Ref --" printCompilerMessage
dict isCombined printStack _:;
@dict isCombined printStack _:;
dict fieldCount printStack _:;
"-- empty Tuple --" printCompilerMessage
() isCombined printStack _:;
() fieldCount printStack _:;
"-- non-Struct values --" printCompilerMessage
0 isCombined printStack _:;
[] isCombined printStack _:;
0
] "main" exportFunction
Expected Output During Compilation
-- Dict and Ref --
TRUE
TRUE
1
-- empty Tuple --
TRUE
0
-- non-Struct values --
FALSE
FALSE
See also
alignmentbuiltin(schema -- alignment)Returns the storage alignment requirement of the dereferenced schema.code?builtin(schema -- isBlock)HistoricalBlockdereferenced-schema test.codeRef?builtin(schema -- isCode)Codedereferenced-schema test.fieldCountbuiltin(schema -- itemCount)Item count of a Struct schema.hasbuiltin(schema itemName -- hasName)Known-name presence test on a Struct schema.managed?builtin(schema -- isManaged)Managed-lifetime dereferenced-schema test.samebuiltin(leftSchema rightSchema -- isSameSchema)Exact dereferenced-schema equality test.schemaNamebuiltin(schema -- reportedName)Reported name of the dereferenced schema.storageSizebuiltin(schema -- size)Returns the storage size of the dereferenced schema.virtual?builtin(schema -- isMeta)Historical Meta dereferenced-schema test.