Page 1 of 1

Passing a subroutine to another

Posted: Sun Feb 01, 2026 12:13 am
by paues
Is it possible to pass a subroutine as an argument to another subroutine? That is, something like

Code: Select all

call subA("subB") subroutine subA(string %f) call {%f} endsub subroutine subB @uiprompt("success!") endsub
or

Code: Select all

call subA(subB) subroutine subA(subroutine f) call f endsub subroutine subB @uiprompt("success!") endsub

Re: Passing a subroutine to another

Posted: Mon Feb 02, 2026 9:24 am
by EViews Gareth
I believe because all subroutine loading is done as a pre-processing step before any other part of the program, this is not possible.