954,523 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Qbasic problems (Out of 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.

Transworld
Newbie Poster
14 posts since Apr 2004
Reputation Points: 11
Solved Threads: 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.

derf9o9
Newbie Poster
1 post since May 2004
Reputation Points: 10
Solved Threads: 1
 

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.

Transworld
Newbie Poster
14 posts since Apr 2004
Reputation Points: 11
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You