|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Re: VB?
Quote:
Please ask a specific question if you want a specific answer. We are not psychic; we can not read your mind. |
|
#2
|
||||
|
||||
|
Re: VB?
Yes, Visual Basic.
Let me post a few questions now. |
|
#3
|
||||
|
||||
|
reading and writing binary data with a file
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:
"3 34" 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? |
|
#4
|
|||||
|
|||||
|
Re: reading and writing binary data with 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).
|
|
#5
|
|||||
|
|||||
|
Re: reading and writing binary data with a file
Quote:
Code:
Open "myfile" For Binary As #1 Please read the docs first, though. Binary mode files do not know sizes of data blocks; it loads enough data to fill the variable. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| VB .Net Question | Raven_Writer | Programming | 10 | 20-07-2003 10:32 |
| White Paper Discuss: VB .NET Dashreader custom control source | CD47-Bot | Extra Discussion | 2 | 19-01-2003 19:32 |
| vB 3.0 - Sneak Peek | Brandon Martus | CD Forum Support | 13 | 30-06-2002 23:38 |
| VB program | archiver | 2000 | 0 | 24-06-2002 00:29 |
| VB Program to monitor robot variables | DanL | Programming | 7 | 15-02-2002 22:35 |