|
As I said in my previous post, I wrote programs in BASIC language in 1983.
A seventh-grade student said he could make them faster and easier and he did. I decided to be a computer user rather than a programmer. |
But I decided to recover memories of that experience, found a free compiler, and entered the 181 lines I had written 43 years ago.
Each command in BASIC language has its own line, but to save space, commands here are separated by a ; .
920 Cls ; 921 GoTo 100 ; 930 Print “ENTER ; RADIUS OF CYLINDER END” ; 940 Print ” ” ; 950 Input R ; 960 GoSub 1620 ; 970 Print “ENTER HEIGHT OR LENGTH OF CYLINDER” ; 980 Print ” ” ; 990 Input H ; 1000 A = (6.28 * R * H) + (6.28 * (R ^ 2)) ; 1010 GoTo 1370
The programs that worked then, did not work now, but the compiler told me what lines had errors.
Having the time granted to a retired, near-nonagenarian, I decided to re-learn some code and processes and wrote:
799 Print “CYLINDER – 2 ENDS” ; 800 Print “CYLINDER RADIUS” ; 801 Input R ; 802 GoSub 2000 ; 803 Print “CYLINDER HEIGHT or LENGTH” ; 804 Input H ; 805 GoSub 2000 ; 806 A = (6.28 * R * H) + (6.28 * R ^ 2) ; 807 Print “CYLINDER SURFACE AREA” ; 809 Print A; U$; ” sq” ; 810 GoTo 4000
It took many hours of my granted time reduce it to 166 lines and make it work.
Back in the day, it took a single entry on the Apple II computer to start the program. After several hours of searching, I didn’t find an easy or free way to do this on my 2500 times faster computer.
My experimenting with the BASIC language is over, but if I could remember the name of that seventh grader …
Discover more from JMB's Simple Site
Subscribe to get the latest posts sent to your email.