Re: BinaryIO
- To: mathgroup at smc.vnet.net
- Subject: [mg57826] Re: BinaryIO
- From: dh <dh at metrohm.ch>
- Date: Thu, 9 Jun 2005 05:18:39 -0400 (EDT)
- References: <d86b4j$dgs$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi Marko, First, FromDate[{2000, 1, 1, 0, 0, 0}] + i is an integer and you need the format: Integer64 instead of Real64 Second, "BinaryReadList" used without specifying the numbers of elements does not always work properly and returns a superfloues last element. Further, if the file is not close before calling "BinaryReadList" without numbers of elements, it returns subsequently more elements. "BinaryReadList" is not properly implemented! Mayby Wolfram takes a not. Best is always to specify the number of elements in "BinaryReadList". sincerely, Daniel Marko Kastens wrote: > Hi, > > I have just updated to Mathematica 5.1.1.0 and trying the new BinaryIO-Commands to > increase the IO speed. But ... here is something strange: > > > n = 1000000; > TSout = Table[{FromDate[{2000, 1, 1, 0, 0, 0}] + i, Random[]}, {i, n}]; > BinaryWrite["binTS.dat", TSout, {"Real64", "Real64"}]; // Timing > TSin = BinaryReadList["binTS.dat", {"Real64", "Real64"}]; // Timing > TSout == TSin > > > Evaluating these lines with a fresh kernel: everything is ok. Evaluate them a > second time and TSout==TSin produce a _False_. Restarting the kernel: > everything is ok. > Every time I (try to) overwrite the file _binTS.dat_ I got a False. It seems to > me that the routine is not able to overwrite files. > > Hmmm, any suggestions? > > marko >