develooper Front page | perl.beginners | Postings from September 2009

Re: decimal to binary?

Thread Previous | Thread Next
From:
Uri Guttman
Date:
September 23, 2009 14:29
Subject:
Re: decimal to binary?
Message ID:
87iqf9pcyd.fsf@quad.sysarch.com
>>>>> "JWK" == John W Krahn <jwkrahn@shaw.ca> writes:

  JWK> AFAIK floating point numbers don't have endianness (but I may be wrong.)
  JWK> (Besides, in the above example, endianness would be on the pack('d')
  JWK> side of the equation.)

floats are no different than integers in that you must select the
ordering of their bytes when stored in ram. this is done naturally at
the machine level but if you want to control endianess with floats in
perl you need to use reverse at some point.

uri

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About