// Title : COMAL Example 15 // Author : John Walsh // Date : 16 April 2000 // first_actual$ := "First" second_actual$ := "Second" // PRINT "Values at start of program are :" PRINT "first_actual$ = "; first_actual$ PRINT "second_actual$ = "; second_actual$ // exchange (first_actual$, second_actual$) // PRINT "Values at end of program are :" PRINT "first_actual$ = "; first_actual$ PRINT "second_actual$ = "; second_actual$ END // PROC exchange (REF formal_one$, REF formal_two$) LOCAL swap$ swap$ := formal_one$ formal_one$ := formal_two$ formal_two$ := swap$ ENDPROC exchange