• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Problem with reading 4-byte floats from file on Intel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with reading 4-byte floats from file on Intel


  • Subject: Re: Problem with reading 4-byte floats from file on Intel
  • From: jj <email@hidden>
  • Date: Wed, 05 Dec 2007 13:57:02 +0100
  • Thread-topic: Problem with reading 4-byte floats from file on Intel

Well, you could swap bytes before attempting to read (if that is the real
issue)... But noone of the methods I know may be faster than your C tool...


jj

* BTW, I never read a specific binary file known to contain numbers. I used
in my test a random text file, but I guess it's the same: it will just read
double-bytes and interpret them as small reals.

>
> Hello jj,
>
> I was reporting my experiences with Mac OS X 10.4, not 10.5.  But it is
> good to know that my future testing with 10.5 would also fail.
>
> Having found out on a non-Apple web page that (apparently) AppleScript
> is always reading binary files in big-endian mode, I have abandoned this
> script.  I wrote a C command line tool in just a few minutes that did
> exactly what I wanted.
>
> Thanks for your help, everybody.  If there is more information on how to
> do this in AppleScript, I am still interested!
>
>             - Rick
>
> On 12/4/2007 7:35 PM, jj wrote:
>>> First, running Leopard I do reiterate I get an error.
>>
>> Ooops! I didn't read before this issue was Leopard-related. I thot it was
>> only Intel-related.
>>
>> I can only confirm that reading small reals works fine in my machine, OS X
>> 10.4.11 ;-)
>>
>>
>> jj
>>

--
http://www.macscripter.net/
http://www.osaxen.com/


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Problem with reading 4-byte floats from file on Intel
      • From: email@hidden
References: 
 >Re: Problem with reading 4-byte floats from file on Intel (From: email@hidden)

  • Prev by Date: Re: What makes AppleScript difficult
  • Next by Date: Re: Problem with reading 4-byte floats from file on Intel
  • Previous by thread: Re: Problem with reading 4-byte floats from file on Intel
  • Next by thread: Re: Problem with reading 4-byte floats from file on Intel
  • Index(es):
    • Date
    • Thread