Thanks for the suggestions. The most common idea was to use a
logical. Using a Logical works for writing the null byte. However,
it can't be used to write just any value; it holds only 0 or 1 no
matter what you assign to it. So I guess you could use fixed-length
strings to hold any non-zero byte values and a logical set to FALSE
for null bytes. 

You can also use smallints. If you want to write three bytes, stuff
bytes one and two into a smallint and write it into position 1 (put
#1,1,iBytes). Then stuff bytes two and three into the smallint, and
write it into file position 2. This actually writes byte two twice,
but it has the advantage that you can position a smallint into any
spot in the file and get the desired effect. The other advantage is
that this method is a general one; any byte can be stuffed into
integers. You don't have to treat null bytes specially.

-- 
- Bill Thoen
------------------------------------------------------------ 
GISnet, 1401 Walnut St., Suite C, Boulder, CO  80302
tel: 303-786-9961, fax: 303-443-4856
mailto:[EMAIL PROTECTED], http://www.gisnet.com
------------------------------------------------------------

---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 2815

Reply via email to