Page 1 of 1

QBASIC Question

Posted: Thu Aug 09, 2007 7:44 pm
by Austin
Ok, here is the code:

Code: Select all

1 PRINT "LOGIN:"; : INPUT L$
L$ = UCASE(L$)
IF L$ = "AUSTIN" THEN
PRINT "LOGGED ON AS AUSTIN."
ELSE PRINT "LOGIN NAME INCORRECT, TRY AGAIN."
GOTO 1
END IF
The problem is when it prints out it looks like this:
LOGIN:?

I want it to print like this:
LOGIN:

How would I get rid of the "?".

Regards,
Austin

Posted: Thu Aug 09, 2007 8:02 pm
by MystikShadows
Hi Austin,

Here's one thing you can try that might solve your problem

1 PRINT "LOGIN:";: LINE INPUT L$

instead of what you have on line one.

this should make your ? dissapear.

Hope this helps

Posted: Fri Aug 10, 2007 12:01 am
by Anonymous
You can also do it this way

Code: Select all

INPUT "LOGIN: ",L$

Posted: Sat Aug 11, 2007 6:17 pm
by Austin
Sorry for my late response, thanks both of you! Both options worked great, and my Munshkin : Text Adventure game is going along great.

Thanks,
Austin