[slang-users] try does not run require

John E. Davis davis at space.mit.edu
Sat Jun 10 23:45:42 EDT 2006


Jörg Sommer <joerg at alea.gnuu.de> wrote:
>#v+
>% cat /tmp/test.sl
>try
>{
>    require("stkcheck");
>    enable_stack_check();
>}
>catch OpenError: {} % stkcheck not in path

This fails because slang makes no attempt to execute the code in the
statement until the statement is complete.  As a result,
enable_stack_check is referenced before it has been defined.

--John




More information about the slang-users-l mailing list