Re: Big numbers (again) and complex routine
Re: Big numbers (again) and complex routine
- Subject: Re: Big numbers (again) and complex routine
- From: Emmanuel <email@hidden>
- Date: Fri, 7 Mar 2003 17:41:28 +0100
At 12:16 PM +0100 07/03/03, julifos wrote:
The problem is with fEoF (eof of file opened for access). If we are talking
about a 800MB file, it will throw an error "can't make fEoF into an
integer".
I think you may be interested in the following remarks:
1. (you certainly know that, but just in case) to read a file, you
don't need to have it "open for access"
2. there is no error AFAIK when you attempt to read too many
characters. I have tested:
-------------------------------
read file "bla" for 2000000
-------------------------------
with a very short file, and I just get the whole contents of the file
3. I don't quite understand the statement "starting from this
position; if omitted, start at last position read from" (Standard
Additions dictionary). I suppose this statement is valid only if you
"open for access" the file. Otherwise, you'll have to:
-------------------------------
read file "bla" from 2000001 for 2000000
-------------------------------
to get the next chunk of the file. You've got to read successive
chunks, since "read" does require an integer parameter, and you'll
never make 800,000,000 into an integer.
(FYI, OMM, reading and displaying 2 MB in a text window of Smile
takes 3.8 seconds)
4. If you are manipulating numerical data, the "extractcolumn"
command of Smile may prove useful; though you'll get a more
professional feel if you can use binary files, and the "read binary"
command of the Satimage osax. Our clients use "read binary" against
gigabytes of data.
Best regards,
Emmanuel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.