Temperature conversion/REXX: Difference between revisions

m
→‎{{header|REXX}}: added a comment that wasn't pasted, optimized a subroutine.
m (→‎{{header|REXX}}: changed a comment.)
m (→‎{{header|REXX}}: added a comment that wasn't pasted, optimized a subroutine.)
Line 5:
 
=={{header|REXX}}==
<lang rexx>♀/*REXX program converts temperatures for fifty─eight different temperature scales. */
<lang rexx>
 
/*
≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
Line 39 ⟶ 40:
parse var x z '(' /*handle any comments (if there're any)*/
parse upper var z z ' TO ' ! . /*separate the TO option from number.*/
parse upper var z z 'NOT' not . , noS noE /*separate NOT option from number. */
/*for the NOT keyword, see (below).*/
/* *xxx ◄───don't show scales that end in xxx */
Line 432 ⟶ 433:
 
/*──────────────────────────────────────────────────────────────────────────────────────*/
?: parse arg y 1 yu
upper yu
if not\=='' then do
if noS\=="" then if left(yyu, noL)==noS then return 0
if noE\=='' then if right(yyu, noL)==noE then return 0
end