storageAddress (object -- address)

Inputs

Outputs

storageAddress is a current stack object storage query. It returns the storage address of one non-Meta object as known or unknown Natx. The result depends on the current stack object, including known nilness.

Behavior

Example

{} () {} [
  value: 7;
  text: "hello";
  code: {} () {} codeRef;

  "-- immutable and mutable Ref views --" printCompilerMessage
  value storageAddress printStack _:;
  @value storageAddress printStack _:;

  "-- text and known NIL cases --" printCompilerMessage
  text storageAddress printStack _:;
  0nx value addressToReference storageAddress printStack _:; # a NIL Ref
  @code storageAddress printStack _:;
] "main" exportFunction

Expected Output During Compilation

-- immutable and mutable Ref views --
Natx
Natx
-- text and known NIL cases --
Natx
0nx
0nx

See also