What does VB stand for? and what are you trying to ask about?
I suspect this user is looking for info on Visual Basic. However with just joining today and no information in the user’s profile, along with no real quesiton being asked and the lack of any explantion I think this post/thread is suspect. I am notifying mods to review.
Well, since this is the programming forum I’m assuming the original poster means Visual Basic (a Microsoft programming language).
There are certainly people around here who are familiar with the language VB (it’s been a couple of years since I’ve written anything in it; but, if you’ve got a specific question I’ll try my best to answer it).
Please ask a specific question if you want a specific answer. We are not psychic; we can not read your mind.
Yes, Visual Basic.
Let me post a few questions now.
In Visual Basic 6 I have written a program to read and write to a file. It works fine. Now I have to do the same for binary data since the information I write to the file has end-of-line and return characters. For instance, when I write to the file, the data looks like this:
Because there is a break in the data. In debug mode, the text data has two boxes where the end-of-line and return characters go.
Anyway, does anyone have any example code of binary level reading and writing to and from a file?
If you are using the FileSystem/TextStream objects, you do not need to use binary access to read/write carriage returns or linefeeds. The only reason the CR/LF combo shows up as two boxes is because there is no way to display it with a single-line textbox (the debug window). If you were to do an asc() on one of those boxes, it would show up as ASCII 13 (CR) or ASCII 10 (LF).
Use the “Binary” mode, eg
Open "myfile" For Binary As #1
You then use the Get and Put statements to read/write data.
Please read the docs first, though. Binary mode files do not know sizes of data blocks; it loads enough data to fill the variable.