global.get
Push a variable's value onto the stack.
Parameters
$label
The label name of the global variable. This can also be the index of the global variable.
The value will be pushed onto the stack.
The stack will contain the same data type as the variable.
Stack Out
* |
The value stored in the global variable. The data type must be the same as the variable used. |
Example
(global $piDiv180 f64 (f64.const 0.0174533))
(func $degreeToRadian (param $degree f64) (result f64)
global.get $piDiv180
local.get $degree
f64.mul
)