/* (c) 1999-2005, Rony G. Flatscher, Wirtschaftsuniversitaet Wien, Austria Europe
   A *possible* solution to excercise # 05
*/

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

Fahrenheit : PROCEDURE
   RETURN ARG(1)*(9/5)+32       /* use argument directly, calculate, return result */