Hello
Is it possible to read a tab-delimited file in Qbasic?
I can read a space-delimeted file but I cant read a tab-delimited one?
How about Quicbasic?
Can I read a tab-delimited file in Quickbasic?
Can you cc the answer to mkeskin@clemson.edu
Thanks
tab delimited
Moderators:Administrator, Global Moderator
- frankiebaby
- Global Moderator
- Posts:95
- Joined:Tue Apr 30, 2002 1:38 am
- Location:Pennsylvania
- Contact:
Re: tab delimited
of course ya can, but ya gotta write the routine urself, i think u can read in on character at a time from the file with S$=INPUT$(1,#1) then make a loop that keeps addings until it hits tab so like
Dim word$ ' to hold each tab delemited word
do
S$ = INPUT$(1, #1)
is S$ <> chr$(tab) then word$ = word$ + S$
loop until s$ = CHR$(tab)
'i think tab is 9
now word$ = the thingy u wanted to input, and it would skip tabs, since the last thing u read was he tab, running the loop again will start up on the next word
so just make sure the file ends with tab
Dim word$ ' to hold each tab delemited word
do
S$ = INPUT$(1, #1)
is S$ <> chr$(tab) then word$ = word$ + S$
loop until s$ = CHR$(tab)
'i think tab is 9
now word$ = the thingy u wanted to input, and it would skip tabs, since the last thing u read was he tab, running the loop again will start up on the next word
so just make sure the file ends with tab