-
Notifications
You must be signed in to change notification settings - Fork 6
Wish list: 'gosub' functionality #8
Comments
Hi there, Thanks for your comment.
If I recall correctly, there's the 'set_uframe()' method along with 'set_utool()'. Unfortunately the example is missing a few things. Please have a look through the tests, which should be a bit more comprehensive: https://github.com/onerobotics/tp_plus/blob/master/test/tp_plus/test_interpreter.rb
I agree. I actually supported this sort of feature in some very early TP+ prototypes, but it did not make it into the current version. Memory management essentially was out of scope. I've been meaning to do a large scale rewrite in Go that incorporates some of these ideas, but I haven't gotten around to it. I'm happy to accept pull requests here though ;) Sent from my iPhone
|
time flies.... 😨 turns out the still need subroutines/functions/methods though. |
I will be out of the office starting 29/04/2016 and will not return until
29/04/2018.
Please contact my colleague Roger Smith:
rsmith@mbaerospace.com
01626 885072
|
Thanks for a great start at providing a tool to allow TP programs to be written using a modern language structure.
The ability to call a 'subroutine' and return would greatly improve structure and readability. I imagine that the return could be implemented by the 'gosub' loading the return label value into a specified register. If a different register were used for each subroutine then nesting of 'gosubs' would be possible.
The text was updated successfully, but these errors were encountered: