Re: Nested functions - better example?

new topic     » goto parent     » topic index » view thread      » older message » newer message

The inner functions have access to the outer function's variables.

In the olden daze, if the inner and outer functions both fit in the same 64k bank of ram, it saved a bank switch and other overhead. So if the inner function was called many times, not bank switching saved a lot of time.

Edit: also, pretty much the only difference tween a program and a bank allocation for a procedure was the header on the bank. So it was sometimes handy to overwrite a header so machine code could be placed there (i used it for device drivers). Way back when, i hoped such shenanigans could be used in Euphoria to implement an eval(), because i didn't know at the time about the intermediate il code.

Kat

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu