Subroutines

Cards (2)

  • FUNCTION triple(number)
    RETRUN number * 3
    ENDFUNCTION
    Called from main program
    y = triple(7)
  • PROCEDURE greeting(name)
    PRINT(“hello”+name)
    ENDPROCEDURE
    Called from main program
    greeting(“Hamish”)