• 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: deivy petrescu <email@hidden>
  • Date: Tue, 4 Dec 2007 17:04:46 -0500


On Dec 4, 2007, at 9:06, email@hidden wrote:

Hello JJ,

I'll generate a small example and post.

How do you generate a list of scripting additions?

     - Rick

On 12/4/2007 4:05 AM, jj wrote:
Has anybody else had a successful experience reading 4-byte floats (aka
"small real") with AppleScript (especially on an Intel Mac)?
No errors here: Mac Mini Intel, OS X 10.4.11.
Tested in both Smile and Script Editor.
Maybe you can upload a sample file somewhere and post a list of scripting
additions in your OS?
jj

Rick, jj and Alexis; First, running Leopard I do reiterate I get an error. The following script:

set x to POSIX file "/Users/deivy/Downloads/xaa"
try
set y to read x from 0 for 512 as small real
on error e number n
return e & return & n
end try

generates the following error on an Intel iMac:
--> "Parameter error.
    -50"
Repeated the script ad-nauseum.
Both in Smile and SE.

Now, I can corroborate Alexis,

set x to POSIX file "/Users/deivy/Downloads/xaa"
tell app "Smile"
set y to read binary x as small integer with big endian
y as a list of real
end


On my Intel iMac returns the desired result *for the file Rick sent me* as promised.



So I am surprised that some of you can actually not get an error message.



The script is fine, it works as expected in my G4 running Leopard.


Deivy _______________________________________________ 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: jj <email@hidden>
References: 
 >Re: Problem with reading 4-byte floats from file on Intel (From: jj <email@hidden>)
 >Re: Problem with reading 4-byte floats from file on Intel (From: email@hidden)

  • Prev by Date: Re: Problem with reading 4-byte floats from file on Intel
  • 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