0

If anyone still knows Qbasic could you take a look at this code for me?


CLS
READ nam$, addr$
DO UNTIL nam$ = "END OF DATA"
PRINT nam$, addr$
READ nam$, addr$
LOOP

DATA ANNE DOE, 1234 BAKER ST., BRUCE LEE, 457 HIGH ST.
DATA HOPE SEW, 222 BANK ST., ENDOF DATA, NO ADDRESS
END

I hit a roadblock in my homework and couldn't figure out what was wrong (Out of DATA). After a while I started downgrading until I finally copied this straight out of the book. Did I copy it wrong? I still get Out of DATA. I would usually figure it out myself but I have a lot of projects due all at once. That's all thanks.

2
Contributors
2
Replies
3
Views
13 Years
Discussion Span
Last Post by Transworld
0

no space between "end" and "of" in the data area
or change it so nam$ string = "ENDOF DATA"

If anyone still knows Qbasic could you take a look at this code for me?


CLS
READ nam$, addr$
DO UNTIL nam$ = "END OF DATA"
PRINT nam$, addr$
READ nam$, addr$
LOOP

DATA ANNE DOE, 1234 BAKER ST., BRUCE LEE, 457 HIGH ST.
DATA HOPE SEW, 222 BANK ST., ENDOF DATA, NO ADDRESS
END

I hit a roadblock in my homework and couldn't figure out what was wrong (Out of DATA). After a while I started downgrading until I finally copied this straight out of the book. Did I copy it wrong? I still get Out of DATA. I would usually figure it out myself but I have a lot of projects due all at once. That's all thanks.

0

Ack... What the...

Thanks haha. I need to be more careful. Sorry for wasting you're time. I thought it would have been something more complicated. Usually I catch my misspelling.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.