Code: Select all
dest%() = a - b : REM Reports 'Number too big' error
dest%() = (a - b) : REM Runs successfully, no error
The first statement initially copies a into every element of array dest%() then it subtracts b from every element of dest%(). The second statement subtracts b from a and then copies the difference into every element of array dest%().
But why should that make a difference to the behaviour? Most likely it won't, but in my particular case the issue was that whilst a - b was a value compatible with a 32-bit integer (i.e. in the range -2147483648 to +2147483647) the value of a itself wasn't!
So when the first statement attempted to copy a into every element of dest%() it quite correctly failed with a 'Number too big' error, whereas the second statement succeeded because only the difference was being copied into the array.