Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help on parallel arrays
#1
i need help on reading a file from an external file source. I also need to add arrays to this. If anyone knows how to do this email me at yodaddy2001@hotmail.com Big Grin or IM me at yahoo, sn lickadyclit or lovpeaceX at AIM
Reply
#2
Why email? Just post your problem more in depth here, as long as you dont ask for people to do it for you.

OPEN, WRITE, PRINT #, GET and PUT are QB's primary file i/o statements, and you create arrays with DIM
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Reply
#3
so far i have OPEN "P4DS03.txt" FOR INPUT AS ....then the last part is what i dont understand in a book i have it says something about using a filenumber% 1 to 255...thats what i dont understand. What does that mean?
Reply
#4
OPEN "P4DS03.txt" FOR INPUT AS #1
INPUT#1, VAR1, VAR2, VAR3[, etc.]
.
.
.
etc.
CLOSE #1


(And there's also LINE INPUT#1. If you had opened it FOR OUTPUT, you'd use "PRINT#1,".)
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Reply
#5
It's like a handle. You can open up to 255 files at one time, but you have to tell which file to write from. So you have this little identifying tag.

OPEN "blah.txt" FOR INPUT AS 1

1 is now your id for "blah.txt". So if you want to get something from it:

INPUT #1, x$

now you've inputted data from file #1 (blah.txt).
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Reply
#6
[dives in] only 255! qbasic sux! [/dives in]
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#7
The number of files that you can have open at once is limited by DOS, not QBasic. DOS will never let you open more than 255 files at once anyways.
Reply
#8
Was that sarcasm? noooooooooo....
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Reply
#9
K...thanx everyone... Big Grin
Reply
#10
Why would you ever need more than 255 files open at once???
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)