61 lines
2.0 KiB
Plaintext
61 lines
2.0 KiB
Plaintext
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
|