467,161 Members | 897 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,161 developers. It's quick & easy.

Commas in strings

Hi

I am trying to program a simple program in Visual Basic which saves various lines of text into simple text files, then another program loads these text files as strings and outputs them to the screen. My problem is I cannot output a string completely if the text file contains a comma. For example (John Smith, Engineer) will only display as "John Smith" with ", Enginner" being ignored. Can some on give me an idea of how to get round this as all I want is the string to contain exactly what is in the text file.

Frank Leggett
Nov 16 '06 #1
  • viewed: 1658
Share:
3 Replies
1GB
Hi

I am trying to program a simple program in Visual Basic which saves various lines of text into simple text files, then another program loads these text files as strings and outputs them to the screen. My problem is I cannot output a string completely if the text file contains a comma. For example (John Smith, Engineer) will only display as "John Smith" with ", Enginner" being ignored. Can some on give me an idea of how to get round this as all I want is the string to contain exactly what is in the text file.

Frank Leggett
Hi Frank
Best thing would be to post the code you are using. That will get the fastest and best response
Thanks
Nov 16 '06 #2
100+
Hi

I am trying to program a simple program in Visual Basic which saves various lines of text into simple text files, then another program loads these text files as strings and outputs them to the screen. My problem is I cannot output a string completely if the text file contains a comma. For example (John Smith, Engineer) will only display as "John Smith" with ", Enginner" being ignored. Can some on give me an idea of how to get round this as all I want is the string to contain exactly what is in the text file.

Frank Leggett
hi

try reading your file with

Line Input #......instead of Input #....
Nov 16 '06 #3
Thanks alot, Line Input works fine.

Frank
Nov 16 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

10 posts views Thread by Randy Yates | last post: by
22 posts views Thread by ineedyourluvin1@yahoo.com | last post: by
7 posts views Thread by AES | last post: by
7 posts views Thread by svm@pc.dk | last post: by
4 posts views Thread by E11esar | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.