Type MisMatch Error?

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!
Post Reply
JasonQuinn1992
Coder
Posts: 42
Joined: Mon Sep 03, 2012 4:32 pm

Type MisMatch Error?

Post by JasonQuinn1992 »

Why am I getting a type mismatch error on the following code? How do i fix it?

**************************************************************
REM The purpose of this program is to utilize The STRING$ Function
REM **************************************************************
REM
REM

CLS
LET WORD$ = "*"
LET COUNT = 2
DO WHILE COUNT <= LEN(WORD$)
REM
REM
REM

CLS
LET WORD$ = "*"
LET COUNT = 2
DO WHILE COUNT <= LEN(WORD$)
PRINT STRING$(WORD$, COUNT)
LET COUNT = COUNT + 1
LOOP
END
LET COUNT = COUNT + 1
LOOP
END


Im getting the error with this line: PRINT STRING$(WORD$, COUNT)...


Thanks, Jason
OPRESION
Veteran
Posts: 61
Joined: Tue Jan 16, 2007 4:15 am
Location: Mexico

Post by OPRESION »

I THINK THE GOOD WAY WOULD BE THIS WAY:

PRINT STRING$(COUNT, WORD$)
MY PAGE: http://Qbasic.phatcode.net" target="_blank
(I ONLY USE WINDOWS 98SE YET, BELIEVE IT OR NOT)
JasonQuinn1992
Coder
Posts: 42
Joined: Mon Sep 03, 2012 4:32 pm

Post by JasonQuinn1992 »

Thanks for the replay, I tried your suggest and was able to get the program to run
Post Reply