Does COBOL support sending a function by reference to a function as a parameter?
I've only looked at a few tutorials at this stage. And Just trying to get an idea of what can be achieve easily. I.E. what knowledge that can be transferred over from other languages.
Does COBOL support sending a function by reference to a function as a parameter?
"Yes".
77 FUNC-PTR USAGE FUNCTION-POINTER.
SET FUNC-PTR TO ADDRESS OF FUNCTION SOME-FUNC
The reason for setting that into quotes:
USAGE FUNCTION-POINTER
was introduced in COBOL 2014, so it may not be available with a specific implementation of the language77 PROG-PTR USAGE PROGRAM-POINTER.
SET PROG-PTR TO ADDRESS OF PROGRAM "MYPROG"
SET PROG-PTR TO ADDRESS OF ENTRY "MYENTRY"