A few things need correcting...by TheBOB (Login qb432l)
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:
## 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.
Goto Forum Home