| ??? 03/30/01 22:59 Read: times |
#10436 - RE: Low and High Byte into Integer |
The most efficient way in 'C' is probably to use a union, but remember that this will be non-portable (byte ordering).
Your compiler might provide a standard macro to do it. In you example, 255 should be 256 (ie, 0x100). Whether multplying by 256 is more efficient that shifting will depend upon your compiler - you'd have to examine the generated code to be sure. |
| Topic | Author | Date |
| Low and High Byte into Integer | 01/01/70 00:00 | |
| RE: Low and High Byte into Integer | 01/01/70 00:00 | |
| RE: Low and High Byte into Integer | 01/01/70 00:00 | |
| RE: Low and High Byte into Integer | 01/01/70 00:00 | |
RE: Low and High Byte into Integer | 01/01/70 00:00 |



