Owning Palette: String/Number Conversion Functions
Requires: Base Development System
Interprets the characters 0 through 9, A through F, and a through f in string starting at offset as a hex integer and returns it in number.
The connector pane displays the default data types for this polymorphic function.
Add to the block diagram | Find on the palette |
The following table illustrates how string, offset, and default affect number.
string | offset | default | offset past number | number | Comments |
---|---|---|---|---|---|
3ab | 0 | 3 | 939 | The conversion starts from the first character 3, as�offset�specifies. | |
3ab | 2 | 3 | 11 | The conversion starts from the third character b, as�offset�specifies. | |
1FFFFFFFF | 0 | 9 | 4294967295 | number�is a 32-bit unsigned integer, as�default�specifies. The result of the conversion is saturated because it is too large to be represented. | |
1FFFFFFFF | 0 | 9 | 8589934591 | number�is a 64-bit unsigned integer, as�default�specifies. | |
f3g | 0 | 2 | 243 | g is not a valid hex character, so conversion stops there. The value of�offset past number�indicates the conversion stops at the third character g. | |
–30 | 0 | 0 | 0 | Negative numbers are not permitted for hex. |