/* 1999-2003, Rony G. Flatscher, Wirtschaftsuniversitaet Wien, Austria, Europe
   A *possible* solution to excercise: 3+4 (4)
*/

IF ARG(1) <> "" THEN            /* non-empty argument?                  */
DO
   PARSE ARG Fahrenheit         /* retrieve the Fahrenheit value        */
   SAY FORMAT(Fahrenheit, 3, 0) "øF" "=" FORMAT( Celsius(Fahrenheit), 3, 2) "øC"
END
ELSE                            /* either no argument or blank string   */
DO Fahrenheit=0 TO 100 BY 4
   SAY FORMAT(Fahrenheit, 3, 0) "øF" "=" FORMAT( Celsius(Fahrenheit), 3, 2) "øC"
END

::ROUTINE Celsius
   RETURN (ARG(1)-32)*(5/9)     /* use argument directly, calculate, return result */