Does anyone remember the old old old BASIC code for converting Fahrenheit to Celsius? I'd really appreciate it if someone would post the text.
Asked
Active
Viewed 129 times
2 Answers
4
Check out the following PDF, on page 40 (pdf page 57):
The code would be something like, for Level II BASIC:
10 INPUT "FAHRENHEIT: "; F
20 C = 5 * (F - 32) / 9
30 PRINT F; " FAHRENHEIT IS "; C; " CELSIUS"
40 GOTO 10
If you're using the Model I with Level I BASIC, or some other severely limited TRS-80, you may need something even simpler.

sifferman
- 2,955
- 2
- 27
- 37
-
How do you know it's not the Model I, Level I? Or the CoCo? Or, $DEITY forbid, the Model 100? :-) – paxdiablo Jan 19 '15 at 06:55
-
Very cool! but I am looking for even an older version. :) – Red Cricket Jan 19 '15 at 06:56
-
@Red, then you need to specify _which_ version. Unless you're trolling of course, which I'm very much starting to suspect :-) – paxdiablo Jan 19 '15 at 06:58
-
Sorry not trolling. really I am sorry I was just hoping an trs-80 hobbyist would have an answer :) – Red Cricket Jan 19 '15 at 07:09
-
@Red, not a hobbyist, but I did cut my teeth on these beasts. This answer is the one you want, bringing the code over, slightly modified, so you don't have to search through an ancient PDF. – paxdiablo Jan 19 '15 at 07:17
1
try following
INPUT "Enter Fahrenheit "; FAHR20 : PRINT "Celsius is ", (FAHR-32) * 5 / 9
-
No. The old original BASIC code. Every line started with an integer and goto was considered good coding style. – Red Cricket Jan 19 '15 at 06:53
-
1@Red, `GOTO` wasn't consider good style by the way, Dijkstra had made that clear in the 60s, _long_ before the Trash80 came into existence. It's just that there was no alternative :-) – paxdiablo Jan 19 '15 at 07:24