fieldIsVirtual (schema ordinal -- hasNoStorage)schema: Value or Ref whose dereferenced schema is Struct and whose selected item is tested.ordinal: Zero-based item ordinal being tested.fieldIsVirtual is a selected-item storage predicate. It tests whether one selected item of the dereferenced Struct schema has no runtime field storage.
TRUE includes static items and Meta items. Current field contents do not participate. This is a schema predicate, not a read-result predicate, so a static item can make fieldIsVirtual return TRUE even though reading that item later produces a non-Meta value and virtual? returns FALSE. A static Ref-like item can make both fieldIsVirtual and fieldIsRef return TRUE, because storage kind and schema kind are tested separately.
ordinal is a zero-based known Int32 selected-item ordinal.TRUE means that the selected item has no runtime field storage.Meta items report TRUE.Ref-like item can make both fieldIsVirtual and fieldIsRef report TRUE.FALSE.ordinal is out of bounds for the Struct schema, the builtin raises a compilation error.{} 0 {} [
dict: {
ordinaryField: 0;
staticField: 0 virtual;
staticCodeField: {} () {} codeRef virtual;
metaField: ();
};
"-- In-place field schema versus read result --" printCompilerMessage
dict 0 fieldIsVirtual printStack _:;
@dict 0 fieldRead virtual? printStack _:;
"-- static field schema versus read result --" printCompilerMessage
dict 1 fieldIsVirtual printStack _:;
@dict 1 fieldRead virtual? printStack _:;
"-- static Ref-like field schema versus read result --" printCompilerMessage
dict 2 fieldIsVirtual printStack _:;
dict 2 fieldIsRef printStack _:;
@dict 2 fieldRead virtual? printStack _:;
"-- meta field schema versus read result --" printCompilerMessage
dict 3 fieldIsVirtual printStack _:;
@dict 3 fieldRead virtual? printStack _:;
tuple: (0 ());
"-- Tuple item storage --" printCompilerMessage
tuple 0 fieldIsVirtual printStack _:;
tuple 1 fieldIsVirtual printStack _:;
0
] "main" exportFunction
-- In-place field schema versus read result --
FALSE
FALSE
-- static field schema versus read result --
TRUE
FALSE
-- static Ref-like field schema versus read result --
TRUE
TRUE
FALSE
-- meta field schema versus read result --
TRUE
TRUE
-- Tuple item storage --
FALSE
TRUE
@ builtin (ordinal structValue -- selectedItem) Ordinal-based one-item read with the ordinal before the Struct value.fieldRead builtin (structValue ordinal -- selectedItem) Ordinal-based one-item read with the Struct value before the ordinal.virtual builtin (--) Historical static-declaration modifier for the next local.virtual? builtin (schema -- isMeta) Historical Meta-schema test.fieldIsRef builtin (schema ordinal -- isRefLike) Ref-like test for one selected item schema.fieldCount builtin (schema -- itemCount) Item count of the Struct schema.fieldIndex builtin (schema itemName -- ordinal) Selected item ordinal from item name under last-match rules.fieldName builtin (schema ordinal -- itemName) Stored item name at one selected item ordinal.has builtin (schema itemName -- hasName) Schema-level known-name presence test.schemaName builtin (schema -- reportedName) Reported name of the dereferenced schema.