This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
i'm sure someone can do better (more efficient) but I was just dusting off my MSBASICS skills from 35 years ago. is there a way to make the LCDPRINT in just one line by combining the OUTPUT? I would love to see improvements/variations on this
5 PRINT "Welcome to Joe's Amazing Calculator"
9 REM GET USER INPUT
10 INPUT "PICK OPERATION ( , -, *, /)"; A$
30 INPUT "Enter First # "; X
40 INPUT "Enter Second # "; Y
99 REM WHICH CALCULATION
100 IF A$ = " " THEN RESULT = X Y:GOTO 200
110 IF A$ = "-" THEN RESULT = X-Y:GOTO 200
120 IF A$ = "*" THEN RESULT = X*Y:GOTO 200
130 IF A$ = "/" THEN RESULT = X/Y:GOTO 200
140 PRINT A$ " IS NOT A VALID OPERATION, PLEASE TRY AGAIN"
150 GOTO 10
199 REM OUTPUT TO LCD
200 LCDCMD 1
210 LCDPRINT X
215 LCDPRINT " "
220 LCDPRINT A$
230 LCDPRINT Y
240 LCDPRINT " ="
250 LCDPRINT RESULT
260 REM PRINT TO MONITOR
270 PRINT X;A$;Y;"="; RESULT
299 REM TRY AGAIN?
300 PRINT "ANOTHER CALCULATION (YES = 1, NO = 0)";
310 INPUT A
320 IF A = 1 THEN 10
Subreddit
Post Details
- Posted
- 1 month ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/beneater/co...