Newbie questions about Pliant
Writing float to a file?
|
Message posted by maybe on 2004/02/28 17:31:05 |
Is it possible to write a Float to a file? If so, how?
Here is what I have:
for (var Int i) 0 63 outFile raw_write addressof:(by8R:i) sizeWrote outFile raw_write addressof:(by8G:i) sizeWrote outFile raw_write addressof:(by8B:i) sizeWrote
basically by8R, by8G, and by8B are arrays that contain 64 floats.
sizeWrote is an integer...i'm guessing that it should return how many bytes are written to the file...curious enough this always comes back as 0.
What am I doing wrong? or if it is simply you can not write floats to a file how could I accomplish this?
thank you for any help. |
Message posted by hubert.tonneau on 2004/02/28 17:59:38 |
Please publish a more complete example. In yours, the definition of sizeWrote is not provide.
Also please specify if you want the floatting point number in ASCII or binary encoding. |
Message posted by maybe on 2004/02/29 21:29:08 |
That was actually my problem, i thought that perhaps sizeWrote would be returned the amount of bytes written.
I should have just placed 8 instead of sizeWrote. |