Hello,

I have four bytes coming into the serial port (MSB first) that represent a signed integer number. I would like to generate an array of numbers that hold the unpacked BCD values.

For example, 0x7FFFFFFF = 2147483647 in decimal, so I would like the array to hold 2,1,4,7,4,8,6,4,7.

I imagine that for negative numbers I would perform a two-compliment before the conversion, and just set a flag to add a "-" in front of the number.....

I'm not sure if some of the built-in 4DGL functions could help with this?

I have four bytes coming into the serial port (MSB first) that represent a signed integer number. I would like to generate an array of numbers that hold the unpacked BCD values.

For example, 0x7FFFFFFF = 2147483647 in decimal, so I would like the array to hold 2,1,4,7,4,8,6,4,7.

I imagine that for negative numbers I would perform a two-compliment before the conversion, and just set a flag to add a "-" in front of the number.....

I'm not sure if some of the built-in 4DGL functions could help with this?

## Comment