Search found 6 matches

by Dr. D'nar
Sun Dec 12, 2004 8:55 pm
Forum: QBasic / QuickBasic related
Topic: RIGHT$ problem
Replies: 5
Views: 1870

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 ...
by Dr. D'nar
Fri Dec 10, 2004 2:00 am
Forum: QBasic / QuickBasic related
Topic: RIGHT$ problem
Replies: 5
Views: 1870

Yes!

(But why doesn't RIGHT$ work?)
by Dr. D'nar
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 ...
by Dr. D'nar
Sat Oct 02, 2004 5:02 am
Forum: QBasic / QuickBasic related
Topic: TIMER fuction
Replies: 3
Views: 1410

Works when I use *10.
by Dr. D'nar
Wed Sep 29, 2004 11:03 pm
Forum: QBasic / QuickBasic related
Topic: Qbasic game controls
Replies: 6
Views: 3192

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 ...
by Dr. D'nar
Tue Sep 28, 2004 11:11 pm
Forum: QBasic / QuickBasic related
Topic: TIMER fuction
Replies: 3
Views: 1410

TIMER fuction

How accurate can the TIMER fuction be? I tried INT(TIMER*100) in the following snippet:

Code: Select all

pause:
start! = INT(TIMER * 100)
stp! = start! + waittime!
DO
curnt! = INT(TIMER * 100)
LOOP UNTIL stp! = curnt!
RETURN
and it locks up. I tried using >= but that doesn't change much...