[plt-scheme] I hate to bother the list with such a rudimentary question... but!

From: geb a (geb_a at yahoo.com)
Date: Tue Jan 3 18:36:38 EST 2006

I'm trying to read/write hexadecimal code to files. 
The problem I am having is that extra characters are
always being added.  I have tried a number of methods
and constantly end up with either extra characters or
the wrong characters.

(define test #x4d )
(define o (open-output-file  "test.out"
'truncate/replace 'binary))
(write test o )
(close-output-port o)

Can anyone tell me why this code might yield 

37 37  or  77 when read by khexedit depending on
whether you read hex or char.

Thank you for all you're help.



Yahoo! DSL – Something to write home about. 
Just $16.99/mo. or less. 

Posted on the users mailing list.