Talk:Host introspection: Difference between revisions

Added a note about endianness in Ada
(→‎Perl Program: About intsize and uvsize.)
(Added a note about endianness in Ada)
 
Line 1:
== Ada ==
The Ada example provided is technically not correct. The `Bit_Order` attribute does not correspond to ''byte'' endianness, it is a representational attribute used to specify the order of ''bits'' in the layout of a machine scalar in a record representation clause. While this is known as ''bit'' endianness' It has no impact on the byte ordering within a machine scalar. This is described in section '13.5.3 Bit Ordering' of the Ada Reference Manual. The language is a bit ambiguous, but this seems to refer explicitly to bit ordering.
 
== C ==
The C example is not correct: While it is true that on current popular platforms a pointer is as large as a word, this is not universally true. For example in x86 16 bit code using the large memory model a pointer has two words (one for the segment, one for the offset). I'd not be surprised if there are other, more current platforms (especially embedded ones) where pointer size and word size don't agree either.
Anonymous user