storageAddress

storageAddress (value -- address)

Inputs

Outputs

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

Behavior

Example

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

  "-- In-place value and Ref --" printCompilerMessage
  value storageAddress printStack _:;
  @value storageAddress printStack _:;

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

Expected Output During Compilation

-- In-place value and Ref --
Natx
Natx
-- text and known NIL cases --
Natx
0nx
0nx

See also