Task

Show how to return more than one value from a function.




 
PROGRAM RETURN_VALUES
 
PROCEDURE SUM_DIFF(A,B->C,D)
   C=A+B
   D=A-B
END PROCEDURE
 
BEGIN
   SUM_DIFF(5,3->SUM,DIFF)
   PRINT("Sum is";SUM)
   PRINT("Difference is";DIFF)
END PROGRAM
 