omron — FLTB real-valued function

FLTB real-valued function FLTB real-valued function Syntax FLTB ($string, first_char ) Function Return the value of four bytes of a string interpreted as an IEEE single-precision floating- point number. Parameters $string String expression that contains the four bytes to be converted. first_char Optional real-valued expression that specifies the position of the first of the four bytes in the string. If first_char is omitted or has a value of 0 or 1, the first four bytes of the string are extracted. If first_char is greater than 1, it is interpreted as the character position for the first byte. For example, a value of 2 means that the second, third, fourth, and fifth bytes are extracted.

An error is generated if first_char specifies four bytes that are beyond the end of the input string. Details Four sequential bytes of the given string are interpreted as being a single-precision (32-bit) floating-point number in the IEEE standard format. This 32-bit field is interpreted as follows: where s is the sign bit, s = 0 for positive, s = 1 for negative. exp is the binary exponent, biased by -127. fraction is a binary fraction with an implied 1 to the left of the binary point. For 0 -1 s * (1.fraction) * 2 exp -127 For exp = 0, the value is zero; for exp = 255, an overflow error exists. eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 241