Anonymous user
Temperature conversion/REXX: Difference between revisions
m
added whitespace.
m (→{{header|REXX}}: changed a comment.) |
m (added whitespace.) |
||
(7 intermediate revisions by 2 users not shown) | |||
Line 2:
Note that conversion from/to the '''Dalton''' temperature scale requires natural logarithms ('''ln'''), and the '''pow''' function.
No commenting/explaining was affixed to the higher math functions because it would detract from the logic of the main program.
<span style='font-family: "Linux Libertine",Georgia,Times,serif;font-size:150%;'>[[REXX]]</span><hr>
<lang rexx>/*REXX program converts temperatures for fifty─eight different temperature scales. */
/*
≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
Line 39 ⟶ 45:
parse var x z '(' /*handle any comments (if there're any)*/
parse upper var z z ' TO ' ! . /*separate the TO option from number.*/
parse
/*for the NOT keyword, see (below).*/
/* *xxx ◄───don't show scales that end in xxx */
Line 237 ⟶ 243:
return
Line 282 ⟶ 287:
abbrev('CELISU' , yU) |, /* 1% misspelled.*/
abbrev('CELSU' , yU) |, /* 1% misspelled.*/
abbrev('HECTOGRADE' , yU) |,
abbrev('CELSIU' , yU) then sn= "CELSIUS"
when abbrev('CIMANTO' , yU,2) |,
Line 432 ⟶ 438:
/*──────────────────────────────────────────────────────────────────────────────────────*/
?: parse arg y 1 yu
upper yu
if not\=='' then do
if noS\=="" then if left(
if noE\=='' then if right(
end
|