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.

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.

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.