Temperature conversion/REXX: Difference between revisions

m
→‎{{header|REXX}}: split a comment from the statement.
(→‎{{header|REXX}}: changed/added comments and whitespace, changed indentations, split compound lines.)
m (→‎{{header|REXX}}: split a comment from the statement.)
Line 15:
parse upper var z z ' TO ' ! . /*separate the TO option from number.*/
parse var z z 'NOT' not . , noS noE /*separate NOT option from number. */
 
/* *xxx ◄───don't show scales that end in xxx */
/* *xxx* ◄─── ◄───don't "show scales that end " in " " begin with xxx */
if not\=='' then do /* xxx* ◄─── " " " " eginbegin with xxx */
if not\=='' then do /* *xxx ◄───don't show scales that end in xxx */
if left(not, 1)=='*' then noE=substr(not, 2)
if right(not, 1)=='*' then noS=left(not, length(not)-1)
Line 47 ⟶ 48:
call scaleName u /*allow alternate temp. scale spellings*/
 
select /*convert N ──► °F temperatures. */
select
when sn=='AMONTON' then F= n * 8.37209 - 399.163
when sn=='BARNSDORF' then F= n * 6.85714 + 6.85714