Number conversions

Home  Back  Next

 

Numbers will be converted to the destination format.

If the conversion will result in a changed value the OK Bit is not set. Example is a division with zero.

Even if the OK Bit is set a try is done for a result. The value will be so near the expected result as possible. For integers the result overflows and the rest of the operation will be returned.

 

Examples:

Division by zero will result 65535 in 16 bit.

200 plus 56 for an unsigned 8 bit returns zero.

 

For time values there exist some predefined conversions. If none of these will fit a format string need to be entered.

The conversions will exist in text output only.

Rules for the format text:

The % sign is the format specifier. If a % should be in the final text it must be given twice.

Letters which can follow behind the format specifier:

d day
H hour from 0 to 23
I hour from 0 to 12
N nanoseconds. Additionally a length can be given (%3N -> milliseconds)
p or P brings the AM or PM
s UNIX time stamp (seconds since 1.1.1970)
S seconds
y year in two letters
Y year in four letters
% the percent sign