I am attempting to read a text file using PowerBasic DOS. I have checked the PowerBasic manuals, searched online, and I am positive the answer is staring at me in the face, but I am completely missing it!! :SHOCKED: Here are three lines from the data file for example:
"358293","Pearl and Hermes Atoll","Island","HI","15","Honolulu","003","275000N","1755000W","27.8333333","-175.8333333","","","","","0","Unknown","09/30/2003",
"358294","Laysan Island","Island","HI","15","Honolulu","003","254615N","1714415W","25.7708333","-171.7375","","","","","3","Unknown","09/30/2003",""
"358295","Barking Sands","Beach","HI","15","Kauai","007","220418N","1594652W","22.0716667","-159.7811111","","","","","0","Kekaha","02/06/1981",""
(yes, each line is on a single line, but they are three separate lines. I separated the lines using colors so you can tell them apart.)
Ok, they all read with spaces interspersed with spaces. When my program reads this file for example, "Pearl and Hermes Atoll" becomes " P e a r l a n d H e r m e s A t o l l " including the double quotes!
Would this be an example of a binary file or anything? This data file contains some characters that have diatribe marks on them. That's ok, right? (I hope so!)
Here is my line that I am reading the above with:
Input #1,FeatId$,FeatNm$,FeatCl$,StatAl$,StatNu$,CntyNa$,CntyNu$,PLaDMS$,PLoDMS$,PLaDEC$,PLoDEC$,SLaDMS$,SLoDMS$,SLaDEC$,SLoDEC$,Elevat$,MapNam$,DateCr$,DateEd$
Only thing I know to do at this point it remove the spaces from each and every variable one at a time, and rerun my program at that point. That would take a couple days- the data file is that large. Does anyone see something stupid I may have done?
Please excuse my use of colors in this post. I was trying to be clear and make sure it was understandable.
Thank you for your understanding, everyone.
Robert
"358293","Pearl and Hermes Atoll","Island","HI","15","Honolulu","003","275000N","1755000W","27.8333333","-175.8333333","","","","","0","Unknown","09/30/2003",
"358294","Laysan Island","Island","HI","15","Honolulu","003","254615N","1714415W","25.7708333","-171.7375","","","","","3","Unknown","09/30/2003",""
"358295","Barking Sands","Beach","HI","15","Kauai","007","220418N","1594652W","22.0716667","-159.7811111","","","","","0","Kekaha","02/06/1981",""
(yes, each line is on a single line, but they are three separate lines. I separated the lines using colors so you can tell them apart.)
Ok, they all read with spaces interspersed with spaces. When my program reads this file for example, "Pearl and Hermes Atoll" becomes " P e a r l a n d H e r m e s A t o l l " including the double quotes!

Here is my line that I am reading the above with:
Input #1,FeatId$,FeatNm$,FeatCl$,StatAl$,StatNu$,CntyNa$,CntyNu$,PLaDMS$,PLoDMS$,PLaDEC$,PLoDEC$,SLaDMS$,SLoDMS$,SLaDEC$,SLoDEC$,Elevat$,MapNam$,DateCr$,DateEd$
Only thing I know to do at this point it remove the spaces from each and every variable one at a time, and rerun my program at that point. That would take a couple days- the data file is that large. Does anyone see something stupid I may have done?
Please excuse my use of colors in this post. I was trying to be clear and make sure it was understandable.
Thank you for your understanding, everyone.
Robert
Comment