MerlinofMines / EasyCommands

Github Repository for Ingame Scripts built by MerlinofMines. Uses MDK to Deploy to SpaceEngineerse
GNU General Public License v3.0
8 stars 3 forks source link

Dynamic Function Calls #172

Closed MerlinofMines closed 2 years ago

MerlinofMines commented 2 years ago

It'd be nice if you could dynamically invoke a function using call variable or goto variable

This would require some new parsing rules. Also, safety on the function name as well as parameter count would have to be best effort.

Note that we may have to relax some of the current function definition validation for this, as the function being invoked won't be known until runtime.

jgersti commented 2 years ago

Shouldn' t tell self to run variable already work?

MerlinofMines commented 2 years ago

the effect of the above would spin off a new request thread, whereas a dynamic function call would block on the same thread in which it was invoked, so the behavior is quite a bit different.

I'll take a look at this one