1. Can someone help me with file printings?

I can't get my program to write #00 (the hex value, not the characters) It
simply won't print it, can anyone tell me how to print #00 to a file?

Thanks in advance

new topic     » topic index » view message » categorize

2. Re: Can someone help me with file printings?

um... i'm not expert at this, but i belive that the '#' can be put into hex
and so can the '00'... if you can do this, and make the values (#00)come up
right, then you should get it... but use this last, unless someone else
agrees...

    ~later~

new topic     » goto parent     » topic index » view message » categorize

3. Re: Can someone help me with file printings?

On Thu, 27 Jul 2000 13:43:02 -0400, Alexander wrote:

>I can't get my program to write #00 (the hex value, not the characters) It
>simply won't print it, can anyone tell me how to print #00 to a file?
>
>Thanks in advance


-- The following program will print #00 to #0F to a binary file:

atom hFile

hFile = open( "test.bin", "wb" )

for i = 0 to 15 do
  puts( hFile, i )
end for

close( hFile )

-- I hope this is what you are trying to do...
-- Brian

new topic     » goto parent     » topic index » view message » categorize

4. Re: Can someone help me with file printings?

Hello Alexander,

>I can't get my program to write #00 (the hex value, not the characters) It
>simply won't print it, can anyone tell me how to print #00 to a file?
>
>Thanks in advance

I think this might work:

puts (fn, #00) -- fn being the file handle

How ever be aware that text editors wont display it as a number.
It will just look like a black block or a smiley face or something.

later,
Lewis Townsend
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

new topic     » goto parent     » topic index » view message » categorize

5. Re: Can someone help me with file printings?

Thanks all, that did the trick, I am aware that it will look like a space
character, some programs I had in mind will use the #00 (file transfer thru
serial cable, encrypting/decrypting program, patching program)

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu