A few things need correcting...

by TheBOB (Login qb432l)
Graphics-Forum

 

To begin with, your INPUT statements call for strings ($), but then your code treats them as numerical values. To correct this, simply eliminate all $'s, which will input numerical values and you won't have any type mismatch errors.

Secondly, your IF statements don't have END IF's. To correct this, you will also have to change your ELSE lines to two lines of code:

## ELSE
## GOTO ##
## END IF

A third problem results from the fact that there is no code to PRINT the clock. Should be a statement such as:

74 LOCATE 12, 12
75 PRINT hours; minutes; seconds

NOTE: Unless you use a LOCATE statement, the output will just scroll down the screen. Also, it's a good idea to give your variables names that describe them.

Finally, immediately following the DO statement, place:
## k$ = INKEY$

... and then add this to the LOOP statement:
## LOOP WHILE k$ = ""

That way, you can end the program by pressing a key.

Make the corrections and then post again if there are any other problems.

-Bob



    
This message has been edited by qb432l on Jul 29, 2009 6:33 PM

Posted on Jul 29, 2009, 6:29 PM

Respond to this message   

Goto Forum Home

 Copyright © 1999-2017 Network54. All rights reserved.   Terms of Use   Privacy Statement  

Quantcast