Select Tools > Convert Hex to SET from the menu to convert hexadecimal numbers to the equivalent Oberon SET constant notation. This is useful if you are converting programs written in a language like C to Oberon.
Enter the hexadecimal number, in either Oberon or C format, and click on the Convert button. The corresponding SET constant will be displayed. You can then copy (CTRL-C) the result and paste (CTRL-V) it into your source code.
Oberon SET Constant Notation
The SET constant notation in Oberon is a convenient way of indicating which bits in the value are set to 1.
Examples are:
Hex value Equivalent SET Constant 0 {} 1 {0} 0x0A0A {1, 3, 9, 11} 0FF0A0AH {1, 3, 9, 11, 16..23} 0FFFFFFFFH {0..31}
NOTE: The command silently ignores any characters which are not hexadecimal digits (0 .. 9, a .. f, A .. F). This conveniently allows you to enter values that are written in C style e.g. 0xFFFF. However, it does mean that you need to take care when entering numbers as it will not warn you of any typing errors (e.g. O instead of 0).
NOTE: The standard Windows shortcut (ALT+F4) can be used to close the Window using the keyboard instead of clicking on the Close Window icon.