Go to Post By far, the worst thing about it was the severe lack of cowbell. There was no cowbell what so ever. Had there been cowbell that would have completely changed everything for me. - Wildcat [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 21-12-2005, 23:20
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: VB?

Quote:
Originally Posted by complete
VB Anyone?
What about it? There's a lot to cover on the subject. Try http://en.wikipedia.org/wiki/Visual_Basic or http://en.wikipedia.org/wiki/Visual_Basic_.NET.

Please ask a specific question if you want a specific answer. We are not psychic; we can not read your mind.
  #2   Spotlight this post!  
Unread 27-12-2005, 13:35
complete's Avatar
complete complete is offline
Registered User
no team
 
Join Date: Dec 2005
Location: Saint Louis
Posts: 6
complete is an unknown quantity at this point
Re: VB?

Yes, Visual Basic.
Let me post a few questions now.
  #3   Spotlight this post!  
Unread 02-01-2006, 20:12
complete's Avatar
complete complete is offline
Registered User
no team
 
Join Date: Dec 2005
Location: Saint Louis
Posts: 6
complete is an unknown quantity at this point
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   Spotlight this post!  
Unread 02-01-2006, 20:19
Eldarion's Avatar
Eldarion Eldarion is offline
Electrical Engineer / Computer Geek
AKA: Eldarion Telcontar
no team (Teamless Orphan)
Team Role: Alumni
 
Join Date: Nov 2005
Rookie Year: 2005
Location: Númenor
Posts: 558
Eldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond repute
Send a message via AIM to Eldarion Send a message via Yahoo to Eldarion
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).
__________________
CMUCam not working? Tracks sporadically? Try this instead: http://www.falconir.com!
PM me for more information if you are interested (it's open source!).

Want the FIRST Email blasts? See here: http://www.chiefdelphi.com/forums/sh...ad.php?t=50809

"The harder the conflict, the more glorious the triumph. What we obtain too cheaply, we esteem too lightly; it is dearness only that gives everything its value."
-- Thomas Paine

If it's falling apart it's a mechanical problem. If it's spewing smoke it's a electrical problem.
If it's rampaging around destroying things it's a programming problem.

"All technology is run on 'Magic Smoke' contained within the device. As everyone knows, whenever the magic smoke is released, the device ceases to function."
-- Anonymous

I currently speak: English, some German, Verilog, x86 and 8051 Assembler, C, C++, VB, VB.NET, ASP, PHP, HTML, UNIX and SQL
  #5   Spotlight this post!  
Unread 02-01-2006, 22:05
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: reading and writing binary data with a file

Quote:
Originally Posted by complete
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?
Use the "Binary" mode, eg
Code:
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.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT -5. The time now is 13:39.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi