Please enable JavaScript to view this site.

Function that converts an integer numeric value, expressed in binary format, to Binary-Coded Decimal (BCD) format.

Syntax

i32 tobcd (i32 value)

value

Variable representing the character (0-:-255) or EOF (-1)

Result

Returns the converted value in BCD format

Validity

Rule, Task

Note

Since the output value is encoded in 4 bytes, the field of variability of the output value is: 0-:-99999999 always positive

The function operates as follows:

The input real-type expression is converted to an integer quantity

The absolute value of the integer quantity is executed

If the value is greater than 99999999, it is restricted to 99999999

The resulting value is converted to BCD

 

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Contents: ALT+c
Search: ALT+s
Exit Menu/Up: ESC