Data update

This commit is contained in:
Ingy döt Net 2025-02-27 18:35:13 -05:00
parent 8e4e15fa56
commit 72eb4943cb
1853 changed files with 35514 additions and 9441 deletions

View file

@ -0,0 +1,9 @@
module ZX81_code {
10 PRINT "ENTER A TEMPERATURE IN KELVINS"
20 INPUT K
30 PRINT K;" KELVINS ="
40 PRINT K-273.15;" DEGREES CELSIUS"
50 PRINT K*1.8-459.67;" DEGREES FAHRENHEIT"
60 PRINT K*1.8;" DEGREES RANKINE"
}
ZX81_code

View file

@ -0,0 +1,60 @@
Module Temprature_Conversions {
Module Decorated_Modules {
Module Cnvt2Fahrenheit (x){Push "Fahrenheit", Round(x*1.8+32, 2)}
Module CnvtFromFahrenheit (x) {Push "Fahrenheit", Round((x-32)/1.8, 2)}
Module Cnvt2Kelvin (x){Push "Kelvin", Round(x+273.15, 2)}
Module CnvtFromKelvin (x){Push "Kelvin", Round(x-273.15, 2)}
Module Cnvt2Rankine (x){Push "Rankine", Round(x*1.8+ 491.67, 2) }
Module CnvtFromRankine (x){Push "Rankine", Round((x-491.67)/1.8, 2)}
Module Temperatures {
Convertion
data format$("From {0}° {1} convert to {2}° {3}", number, letter$, number, letter$)
}
k=253.15
Data "Kelvin="+k
Temperatures k ; cnvtForm as CnvtFromKelvin
Temperatures k ; cnvtForm as CnvtFromKelvin, convert as Cnvt2Fahrenheit
Temperatures k ; cnvtForm as CnvtFromKelvin, convert as Cnvt2Rankine
k=-20
Data "Celsius="+k
Temperatures k ; convert as Cnvt2Kelvin
Temperatures k ; convert as Cnvt2Fahrenheit
Temperatures k ; convert as Cnvt2Rankine
k=-4
Data "Fahrenheit="+k
Temperatures k ; cnvtForm as CnvtFromFahrenheit, convert as Cnvt2Kelvin
Temperatures k ;cnvtForm as CnvtFromFahrenheit
Temperatures k ;cnvtForm as CnvtFromFahrenheit, convert as Cnvt2Rankine
k=455.67
Data "Rankine="+k
Temperatures k ; cnvtForm as CnvtFromRankine, convert as Cnvt2Kelvin
Temperatures k ;cnvtForm as CnvtFromRankine
Temperatures k ;cnvtForm as CnvtFromRankine, convert as Cnvt2Fahrenheit
}
Module Global Convertion {
over ' doublicate stack
Module cnvtForm {
Push "Celsius" : shift 2
}
Module convert {
Push "Celsius" : shift 2
}
cnvtForm : convert
Shift 3 ' move 3rd to 1st
Shift 4 ' move 4th to 1st
}
Module TemperaturesGreek {
Convertion
data format$("Από {0}° {1} μετατροπή σε {2}° {3}", number, letter$, number, letter$)
}
Flush
Data "==========English=========="
Decorated_Modules
Data "==========Ελληνικά=========="
Decorated_Modules ; Temperatures as TemperaturesGreek
Report$ = array([])#str$(chr$(13)+chr$(10))
ClipBoard Report$
Report Report$
}
Temprature_Conversions