Runtime 'binding' of function....
Say I have three functions
Function myOne
StrCpy $R1 "1"
Function End
Function myTwo
StrCpy $R1 "2"
Function End
Function myThree
StrCpy $R1 "3"
Function End
And I want to read a string from a file, and call the function named from the string: i.e.
Some TextFile:
<COMMENT>abadsjglkg</COMMENT>
<ACTION>myTwo</ACTION>
:End File
Var /Global myFilehandle
Var /Global myFunctionName
FileOpen $myFileHandle "myFileName.txt"
## parse the action line here, so that "myTwo" ends up in
## $myFunctionName
## Then:
call $myFunctionName
; I want to resolve the string
; and call what the string resolves to....
; essentially I want it to become a function pointer....
; What mechanism do we have to do runtime
; interpretation of a string...