* (multiplicand multiplier -- product)

Inputs

Outputs

This builtin accepts whole and real numbers. Both inputs are dereferenced and must be non-NIL. The operands must have the same schema.

Behavior

Example: * on Int32 and Real32

* multiplies Int32 and Real32 values, and a known zero operand gives a known 0 even when the other operand is unknown.

{} () {} [
  unknownInt: 7 dynamic;

  "-- int32 --" printCompilerMessage
  3 4 * printStack _:;
  0 7 * printStack _:;
  1 7 * printStack _:;

  "-- zero and unknown int32 --" printCompilerMessage
  0 unknownInt * printStack _:;
  unknownInt 0 * printStack _:;

  "-- real32 --" printCompilerMessage
  2.5r32 4.0r32 * printStack _:;
] "main" exportFunction

Expected Output During Compilation

-- int32 --
12
0
7
-- zero and unknown int32 --
0
0
-- real32 --
10.0r32

See also