Ubuntu Peronista@lemmy.sdf.org to retrocomputing@lemmy.sdf.org · 1 year agoBASIC for the Masseslemmy.sdf.orgimagemessage-square14fedilinkarrow-up144arrow-down12file-text
arrow-up142arrow-down1imageBASIC for the Masseslemmy.sdf.orgUbuntu Peronista@lemmy.sdf.org to retrocomputing@lemmy.sdf.org · 1 year agomessage-square14fedilinkfile-text
You are a BASIC bitch, so type-in and share your BASIC listings here. Any and all BASIC dialects are welcome.
minus-squareZaphod42@lemmy.sdf.orglinkfedilinkarrow-up4·1 year agoOriginally coded for a Sharp PC-1251. Basically my “Hello World” in every programming language I try: 10: INPUT "GEWICHT IN KG" , M 20: INPUT "GROESSE IN M" ,L 30: B=M/L^2 40: PRINT "BMI = ";B I ported this to LF-BASIC https://github.com/LiquidFox1776/LF-BASIC, a BASIC-interpreter written in Python: 10 LET M=0 20 LET L=0 30 LET B=0 40 INPUT "GEWICHT IN KG "; M 50 INPUT "GROESSE IN CM "; L 60 LET L=L/100 70 LET B=M/L^2 80 PRINT "BMI = "; B Then I started using PDP-8-Emulation and TSS-8: 10 LET M=0 20 LET L=0 30 LET B=0 35 PRINT "WEIGHT IN KG.G:" 40 INPUT M 45 PRINT "HEIGHT IN CM:" 50 INPUT L 60 LET L=L/100 70 LET B=M/L^2 75 PRINT "YOUR BMI IS:" 80 PRINT B 90 END
minus-squareUbuntu Peronista@lemmy.sdf.orgOPlinkfedilinkarrow-up1·1 year agoMy BMI has been nicely calculated in your BASIC dialect!
Originally coded for a Sharp PC-1251. Basically my “Hello World” in every programming language I try:
10: INPUT "GEWICHT IN KG" , M 20: INPUT "GROESSE IN M" ,L 30: B=M/L^2 40: PRINT "BMI = ";B
I ported this to LF-BASIC https://github.com/LiquidFox1776/LF-BASIC, a BASIC-interpreter written in Python:
10 LET M=0 20 LET L=0 30 LET B=0 40 INPUT "GEWICHT IN KG "; M 50 INPUT "GROESSE IN CM "; L 60 LET L=L/100 70 LET B=M/L^2 80 PRINT "BMI = "; B
Then I started using PDP-8-Emulation and TSS-8:
10 LET M=0 20 LET L=0 30 LET B=0 35 PRINT "WEIGHT IN KG.G:" 40 INPUT M 45 PRINT "HEIGHT IN CM:" 50 INPUT L 60 LET L=L/100 70 LET B=M/L^2 75 PRINT "YOUR BMI IS:" 80 PRINT B 90 END
My BMI has been nicely calculated in your BASIC dialect!