Re: Intel, Read/Write, and dates
Re: Intel, Read/Write, and dates
- Subject: Re: Intel, Read/Write, and dates
- From: Harald E Brandt <email@hidden>
- Date: Wed, 28 Nov 2007 11:00:55 +0100
On 28 nov 2007, at 00.37, Nigel Garvey wrote:
Harald E Brandt wrote on Tue, 27 Nov 2007 14:36:02 +0100:
(A recap:
write (current date) as date to fRef
and then:
read file filePath as date
results in 1st January 1904)
I tried your suggestion 'as double integer' and adding the number
directly to the 1904 date, but that does not give the correct result.
However, if I instead write "...as «class isot»", and then read it
"as
«class isot») as date", then it works!
Also the following works: Make the date into a list, and then read
the
file as a list! The first item is the correct date!
Thanks for the information, Harald.
Am I right in guessing that integers and reals are affected by this
problem too on Intel machines, since dates and Unicode text are?
Does the
list approach work with them?
I do not see any problems with integers, reals or unicode text. Only
dates.
write 4711 as integer to fRef
read file filePath as integer
--> 4711
write 4.711 as real to fRef
read file filePath as real
--> 4.711
write "4.711" as Unicode text to fRef
read file filePath as Unicode text
--> "4.711"
(and it also works for a string having a Japanese character. These
tests are on Leopard.)
(And of course I have some 'set filePath...', 'set eof fRef to 0' and
'close access fRef' around the code above.)
Still, I want to know: When did this problem occur?
I have a commercial software spread around the world, and I want to
get an idea of how long this bug has been with us, and for what OSs.
(And it's got to be reported by someone, right?)
Regards,
____heb____________________
Harald E Brandt http://bragit.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