| Common Lisp: Goto tags and blocks/return-from have lexical scope and dynamic extent. Lexical scope means that one can goto to enclosing goto tags and one can return from enclosing blocks. "dynamic extent" means that corresponding scoping constructs tagbody and block not have been exited yet. CATCH/THROW has dynamic scope and dynamic extent. Means that the CATCH targets will be looked up on the stack. Then Common Lisp has UNWIND-PROTECT, which sets up a dynamic scope. When leaving this scope by a non-local control transfer, it is ensured that some specified code will be executed. These are then building blocks for higher-level control, like the Condition System, which provides condition types, handlers, restarts, ... which is used then for error handling, where on error the stack is left like it is. > Assembly lets you jump anywhere it's just that jumping to some arbitrary place might not make sense. |