Task

Pass a function     as an argument     to another function.



Related task

   First-class functions


PROC compute(func, val)
  DEF s[10] : STRING
  WriteF('\s\n', RealF(s,func(val),4))
ENDPROC
 
PROC sin_wrap(val) IS Fsin(val)
PROC cos_wrap(val) IS Fcos(val)
 
PROC main()
  compute({sin_wrap}, 0.0)
  compute({cos_wrap}, 3.1415)
ENDPROC