I'm looking to create an application using the Callin API provided by InterSystems, but some of existing M code I need to use relies on assumed variables.
How can I provide such state to the tags I call?
(Note that if I add the variable as a formal parameter, it will get new
'd and other tags will stop working.)
I'd like to create a system whereby I can insert code in another language potentially 'sandwiched' by M code:
s assumed="variable"
s x=$$DoSomethingFunky("FunctionName","arg1","arg2","arg3")
; some other file that's being executed by my Callin API program
FunctionName(a1, a2, a3) -> ", ".join(a1, a2, a3, assumed, DoSomethingFunkier(a2))
; back to M
DoSomethingFunkier(param1) q "(hello, "_param1_" and "_assumed_")"
So x
above would be "arg1, arg2, arg3, variable, (hello, arg2 and variable)"
.
I'm looking for a way to pass around the value of the assumed
variable.