Wheel IDE

Online demo »

VM Runtime errors

#1 Range check error

The program tries to write an index of an array less or greater than the size of the array.
In the following example a number outside of the range of the array is written, this results in a range check error:

number i
proc main()
    number b[2]
    i = 4
    i = b[i]
end'

#2 Division by zero

The program tries to divide a number by zero.
In the following example a number is divided by a variable conaining 0 which results in a division by zero error:

proc main()
    number i = 5
    number j = 0
    i /= j
end

#3 Heap overflow

The program tries to use more memory than was allocated, the standard number of memory entries available is 1024.