Re: Reading and writing double floats from binary files

JP Massar <[email protected]> Tue, 05 Aug 2003 10:44:53 -0700
Newsgroups gmane.lisp.corman
Message-ID <[email protected]>
At 01:44 AM 8/5/03, you wrote:
>Hello
>
>I have a file which contains some double floats (8 bytes) and some integer
>values (4 bytes). I would like to read these double floats and the integer
>values, doing some computation and then finally I would like to write
>another file containing again some double floats and some integer values.
>
>Therefore, how can I read double floats and integer values from a file
>and how can I write double floats and integer values to a file ?
>
>In CLisp, I have used the functions "read-integer", "read-float",
>"write-integer" and "write-float" (see http://clisp.cons.org/impnotes.html for
>a description of these functions) for that purpose.

Seems like the easiest approach would be for you to implement
versions of READ-INTEGER, READ-FLOAT, etc.

If the source for these functions in CLisp is available your work might be 90%
done for you.

There's no way to directly do what you want in ANSI Common Lisp
(why is why Clisp has its own functions), and I don't know of corresponding
functionality in Corman, although it might be there.




------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/sO0ANB/LIdGAA/ySSFAA/SyjtlB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
[email protected]

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/