Re: Binary I/O Operations? Not there yet...
Dick Holmes wrote:
> Well, I've tried a couple of different libraries (thanks for the suggestions)
> but they all use "puts" to do the writing. The problem I'm finding with "puts"
> is that it wants to put out carriage return/linefeed when it finds #00 in a
> string. What I need instead is a function (or procedure) that actually writes
> the #00 and goes on until it runs out of characters (either due to a limited
> count or the end of a sequence). I thought perhaps "puts" would do this since
> I opened my file using the "wb" mode, but no such luck.
I cannot confirm this finding (using EXW.EXE 3.0.2 on Windows XP).
The following code snippet
integer fn
fn = open("test.dat", "wb")
puts(fn, "abc" & 0 & "def")
close(fn)
works fine for me. In a HEX viewer the generated file reads
61 62 63 00 64 65 66
as expected.
Regards,
Juergen
|
Not Categorized, Please Help
|
|