| ??? 11/18/04 22:52 Read: times |
#81471 - It's the standard way! Responding to: ???'s previous message |
A union is the standard way to access the same physical memory via more than 1 different 'C' data types, but remember that it is not portable - because it relies upon the particular Compiler's internal data representation.
If portability is important, you must use the shift-and-mask approach - which may be less efficient. For the record, and since Steve (Mr Pascal) Taylor seems to be in communicado at the moment, the equivalent in Pascal is a Variant Record. |
| Topic | Author | Date |
| Efficient method... (C question) | 01/01/70 00:00 | |
| what about a union | 01/01/70 00:00 | |
| Well that makes sense! | 01/01/70 00:00 | |
| It's the standard way! | 01/01/70 00:00 | |
| Same subject as the post I'm replying to | 01/01/70 00:00 | |
| byte order | 01/01/70 00:00 | |
Thanks! :) | 01/01/70 00:00 |



