|
-
Sep 25th, 2000, 04:09 AM
#1
transcendental analytic
A file is always a file, it's how you read it that will decide what format it is.
a "binary" file is probably a file stored with binary contents of variables so yes, binary is the correct
method to read that file. I assume you don't have any specific variables known there so you may load it into a byte array
Code:
Dim buffer() as byte
Open filepath for binary as #1
Get#1,,buffer
close #1
debug.print "The hex value of the 42'nd byte in the file is: " & Hex(buffer(42))
Now the last line will show you how to convert it to hex, you use Hex() function.
Also if you want to convert a string character to hex then use Hex(ASc())
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|