-
Question about reading file
I'm reading a file into an array where I'd like to not have it include commas into the string it reads into. Currently with the code below, when it encounters a comma or a new line it loads into a separate array. Can I specify the character I use to separate the file to something other than a comma?
Open varDir For Input As #5
Do Until EOF(5)
Input #5, strAllString(i)
i = i + 1
Loop
Close #5
-
Use LINE INPUT - this will read line by line into a string (incl commas) and you can then parse it yourself (incl removing commas if you want to).
You may want to look at the Split function as well.
Last edited by gupex; 02-27-2005 at 07:04 PM.
-
Worked perfectly, thanks!
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
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks