Integer overflow: Difference between revisions
m
→{{header|Wren}}: Changed to Wren S/H
(add RPL) |
m (→{{header|Wren}}: Changed to Wren S/H) |
||
Line 2,885:
However, within this overall framework, Wren also has an unsigned 32-bit integer sub-system when dealing with bitwise operations. All values are converted internally to such integers before the corresponding C bitwise operation is performed (Wren's VM is written in C) and can therefore overflow without warning. Fortunately, we can easily observe these effects by performing the operations required by the task and then (for example) right shifting them by 0 places.
<syntaxhighlight lang="
System.print("Unsigned 32-bit:")
for (expr in exprs) System.print(expr >> 0)</syntaxhighlight>
|