[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Mon Dec 09, 2024 5:17 pm
... is there a possibility to tell a subroutine who called it, and what to call when it closes?
Like an addressof (subroutinelabel) function, and a gosub address?
...
I think what you are describing is what I know as a "state engine".
The caller assigns a value to a 'state' variable. Hence, the sub knows who called it.
Also, (somebody correct me if I have this wrong) subroutines can be called by using a string to hold the name. An array of strings could enable calling subroutines by variable value. A similar function could also be structured within a select/case function.
Maybe not exactly what you are after but a potential workaround?