storageSize (schema -- size)
Inputs
schema: Object orRefwhose dereferenced schema determines the reported storage size.
Outputs
Ref inputs are followed before the query. Current value contents, current value state, and current view qualifiers do not participate.
Behavior
Example
{} 0 {} [
value: 0n8 dynamic;
pair: { left: 0n8; right: 0n8; };
"-- same schema, same result --" printCompilerMessage
0n8 storageSize printStack _:;
value storageSize printStack _:;
@value storageSize printStack _:;
"-- size versus alignment --" printCompilerMessage
pair storageSize printStack _:;
pair alignment printStack _:;
0
] "main" exportFunction
Expected Output During Compilation
-- same schema, same result --
1nx
1nx
1nx
-- size versus alignment --
2nx
1nx
See also
addressToReferencebuiltin(address modelValue -- reconstructedValue)Typed reconstruction from a numeric storage address. Ref-like model objects keep their schema, and direct non-Ref-like model objects produceRefresults.alignmentbuiltin(schema -- alignment)KnownNatxalignment requirement of the dereferenced schema.manuallyDestroyVariablebuiltin(object --)Manual in-place destruction without freeing storage.manuallyInitVariablebuiltin(object --)Manual initialization in existing storage.storageAddressbuiltin(object -- address)Current stack-object storage-address query; knownNILRef,Text, andCodeobjects yield0nx.