visual basic

This is a discussion on visual basic within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Hi all;
I know this is not a Visual basic board but i figured there has to be someone here ...

visual basic

Hi all;

I know this is not a Visual basic board but i figured there has to be someone here who can help me out. My problem is when i read through a text file i need to extract only the numeric data from the file. The real problem is that this needs to be done in visual basic, and i do not know where to start. I have opened up the file and read in its contents line by line

Re: visual basic

Anyone offended by the site of VB code should cover their eyes before reading further....

Code:

dim iFF as integer, iStrLen as integer, iMidCntr as integer
dim iLineLen as integer
dim sFileName as string, sLineIn as string, sMid as string
dim bNumFnd as boolean
bNumFnd = false
iFF = Freefile
sFileName="C:\test.txt"
open sFileName for input as #iFF
do while not eof(iFF)
line input #iFF, sLineIn
iLineLen=len(sLineIn)
for iMidCntr = 1 to iLineLen
if IsNumeric(mid$(sLineIn,iMidCntr,1)) then
bNumFnd = true //this would be where you do your extraction
end if
if bNumFnd then bNumFnd=false //reset it before reading in the next bit of data
next iMidCntr
loop
close #iFF

Help when you can man. I also use VB from time to time, the only reason I didn't try to help other than post a link was that I was busy, and I don't have VB in the office, (one has certain standards you know!).

*Discalimer*
The views contained in the following post do not in any way reflect upon the belifes of any real person. The post is purely for educational purposes and does not in any way support or endorse the use of hungarian notation in any form.
*Disclaimer*

I was just joking. I mentioned DavidP because I know he has a comment about hungarian notation in his signature.

Why? VB isn't the best language, but that doesn't mean it should never be used

I was half-joking here. I make my living in VB (well most of it, probably about 70 (VB) - 30 (C++) ).

A lot of VB programmers have the idea that they are considered "lesser" developer (happens to be a popular topic on VB forums) by C/C++ programmers. I don't believe it. I think VB has it's strengths (especially for rapid DB development) and I made it clear when I first started posting here that I was coming from a VB background and everyone was really helpful and friendly.