Okay here's the new code:
INPUT "File to read from: ", infile$
INPUT "File to output to: ", outfile$
OPEN infile$ FOR INPUT AS #1
OPEN outfile$ FOR APPEND AS #2
DO
'Temp$ = ""
'Sep! = 0
'ans$ = ""
'que$ = ""
INPUT #1, Temp$
cnt! = cnt! + 1
Sep! = INSTR(Temp$, "|")
ans$ = MID$(Temp$, 1, Sep% - 1 ...
Search found 6 matches
- Sun Dec 12, 2004 8:55 pm
- Forum: QBasic / QuickBasic related
- Topic: RIGHT$ problem
- Replies: 5
- Views: 1870
- Fri Dec 10, 2004 2:00 am
- Forum: QBasic / QuickBasic related
- Topic: RIGHT$ problem
- Replies: 5
- Views: 1870
- Mon Dec 06, 2004 11:46 pm
- Forum: QBasic / QuickBasic related
- Topic: RIGHT$ problem
- Replies: 5
- Views: 1870
RIGHT$ problem
RIGHT$ doesn't seem to be working propley...
INPUT "File to read from: ", infile$
INPUT "File to output to: ", outfile$
OPEN infile$ FOR INPUT AS #1
OPEN outfile$ FOR APPEND AS #2
DO
temp$ = ""
sep! = 0
ans$ = ""
que$ = ""
INPUT #1, temp$
cnt! = cnt! + 1
sep! = INSTR(temp$, "|")
ans$ = LEFT$(temp ...
INPUT "File to read from: ", infile$
INPUT "File to output to: ", outfile$
OPEN infile$ FOR INPUT AS #1
OPEN outfile$ FOR APPEND AS #2
DO
temp$ = ""
sep! = 0
ans$ = ""
que$ = ""
INPUT #1, temp$
cnt! = cnt! + 1
sep! = INSTR(temp$, "|")
ans$ = LEFT$(temp ...
- Sat Oct 02, 2004 5:02 am
- Forum: QBasic / QuickBasic related
- Topic: TIMER fuction
- Replies: 3
- Views: 1409
- Wed Sep 29, 2004 11:03 pm
- Forum: QBasic / QuickBasic related
- Topic: Qbasic game controls
- Replies: 6
- Views: 3190
It keeps on going because when you hold down a key, the key simply keeps sending the siginal that it's held down over and over. The BIOS on your computer has a buffer that holds recently pushed keys. What's happening is that the program is reading those buffered key strokes. Like so:
[down key]x3 ...
[down key]x3 ...
- Tue Sep 28, 2004 11:11 pm
- Forum: QBasic / QuickBasic related
- Topic: TIMER fuction
- Replies: 3
- Views: 1409
TIMER fuction
How accurate can the TIMER fuction be? I tried INT(TIMER*100) in the following snippet:
and it locks up. I tried using >= but that doesn't change much...
Code: Select all
pause:
start! = INT(TIMER * 100)
stp! = start! + waittime!
DO
curnt! = INT(TIMER * 100)
LOOP UNTIL stp! = curnt!
RETURN