Author |
Message
Pages: 1
|
||
0CodErr Ziron Guru (send private message) Posts: 199 Topics: 37 Location: | [1505] Nested procedures problem - posted: 2015-01-22 11:29:08 At first code without problems: Code:
Output seems correct: Code:
Next, comment call to p1(); in p0 procedure: Code:
Output was only this: Code:
| ||
Admin Site Admin (send private message) Posts: 933 Topics: 55 Location: OverHertz Studio | [1506] - posted: 2015-01-22 13:55:55 Thanks for report, fixed for next release. Download Ziron Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message. | ||
0CodErr Ziron Guru (send private message) Posts: 199 Topics: 37 Location: | [1749] - posted: 2015-02-20 19:24:55 Code:
| ||
Admin Site Admin (send private message) Posts: 933 Topics: 55 Location: OverHertz Studio | [1765] - posted: 2015-02-23 12:32:14 Fixed for next release, was an major issue with scope related to macros. Thanks for report. Download Ziron Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message. | ||
0CodErr Ziron Guru (send private message) Posts: 199 Topics: 37 Location: | [1847] - posted: 2016-05-03 11:06:32 Seems this work incorrect: Code:
| ||
Admin Site Admin (send private message) Posts: 933 Topics: 55 Location: OverHertz Studio | [1870] - posted: 2016-12-18 22:16:31 After some careful consideration, I've decided not to fix this and instead remove access to local variables outside the sub function scope, instead they should be passed to the sub function. Several reasons made me come to this decision, the first is that automatically, the base function would need to push the stack pointer to the sub function and for sub-sub functions would require 2 pushed stack pointers, this is extremely inefficient, and I would never advise anyone programs like this. The sub functions work great as a way of simplifying a function. As for your code, you just need to replace in your recursive p1 call to "x" instead of "y". Code:
I'm not sure I understand the purpose of this procedure, I guess it is just an example. Download Ziron Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message. |
Currently Active Users: There are currently 3 user(s) online. 0 member(s) and 3 guest(s) Most users ever online was 1046, January 28, 2022, 2:08 pm. Statistics: Threads: 225 | Posts: 1848 | Members: 51 | Active Members: 51 Welcome to our newest member, yecate |