IConv MX, HEX, MO, MB function

Converts hexadecimal, octal, or binary formatted data into internal system format (decimal numbers). The value to convert can be as great as that represented with 32 bits.

internal = IConv(string, "MX")

internal = IConv(string, "HEX")

internal = IConv(string, "MO")

internal = IConv(string, "MB")

IConv (MX, etc.) accepts arguments for the following parameters.

ParameterDescription
stringThe character range for each character in string is 0 - 9, A - F. Using characters outside the respective ranges will result in a conversion error.
MXThe parameter string must be a hexadecimal character set (base 16), it is converted to the equivalent decimal number (base 10).
HEXThe parameter string must be a string of hexadecimal character sets, it is converted to a string of ASCII values.
MOThe parameter string must be an octal (base 8), number, it is converted to a decimal number.
MBThe parameter string must be an ASCII representation of a binary (base 2) number; it is converted to a decimal number. If string yields an incorrect value, a 0 (zero) will be returned.

An understanding of different number bases is required for the effective use of these specifications. Use the following table as a guide to conversions to different number bases.

Conversion CodeIconvOconv
MXhexadecimal to decimaldecimal to hexadecimal
MOoctal to decimaldecimal to octal
MBbinary to decimaldecimal to binary
*Converting various number systems.

A = IConv("2A","MX")
* Output is 42
A = IConv('595A','HEX')
* Output is YZ
A = IConv("1000","MB")
* Output is 8
  • guides/programming/programmers_reference_manual/iconv_mx_hex_mo_mb.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1