Restored from previous forum. Originally posted by dmoc.
.
Gosub in procedures
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Sebi.
You can do this in the current version of PB with already with the following code:
But I agree! The message 'GoSub not allowed inside a Procedure' is not very useful.
You can do this in the current version of PB with already with the following code:
Code: Select all
CallFunctionFast(?GoSub_Label)
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by tinman.
Although I think global variables are always accessed absolutely?
Allowing gosub within a procedure might be OK?
--
I used to be a nihilist but I don't believe in that any more.
(Win98first ed. + all updates, PB3.51, external editor)
Would there be stack problems if you Gosub'bed out of a procedure? Not in the sense that your stack would get mangled, but if you jumped into some global code or another procedure then variables would not necessarily be in the same indexed memory locations.Originally posted by Sebi
But I agree! The message 'GoSub not allowed inside a Procedure' is not very useful.
Although I think global variables are always accessed absolutely?
Allowing gosub within a procedure might be OK?
--
I used to be a nihilist but I don't believe in that any more.
(Win98first ed. + all updates, PB3.51, external editor)