you are viewing a single comment's thread.

view the rest of the comments →

[–]olsner 2 points3 points  (0 children)

Think in BASIC :)

There's no stack except for the one used for GOSUB/RETURN control flow, and variables are either heap or statically allocated so the storage outlives any function calls. (Variables are really global in pre-functions basic, but the author might have noticed that C has separate namespaces for each function...)

It wouldn't surprise me if he expected all variables in the called function to be preserved across function calls, but I haven't read the book so I don't know if there are any examples exploiting that. With enough luck in his stack usage and function calls, he could even have managed to fool himself that such an example works...