tab delimited

Please use this Board for QBasic related requests ( file research, programming, etc.)

Moderators: Administrator, Global Moderator

Post Reply
Guest

tab delimited

Post by Guest »

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
User avatar
frankiebaby
Global Moderator
Posts: 95
Joined: Tue Apr 30, 2002 1:38 am
Location: Pennsylvania
Contact:

Re: tab delimited

Post by frankiebaby »

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
Post Reply