lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>Hello,
>
>I have made a simple debugging tool to help me develop Lua scripts and I
>came upon this problem.
>
>I have set up the debug hooks, this works fine. But when I call lua_dostring
>inside them, the string is evaluated in the global scope (ie. local
>variables are hidden to it). I would need to evaluate it in the local scope
>instead (at the spot I am located in the debugging process). Is there any
>reasonably easy way to do so?
>
>Roman
>vanicek@xtg.cz

This raises the question of the design decision to have variables
automatically global instead of local as in most other languages where the
use of global variables is strongly discouraged.

What comments on this?

Regards,

-----------
Bill Whiten,                                     W.Whiten@uq.edu.au
Julius Kruttschnitt Mineral Research Centre,     W.Whiten@acm.org
The University Of Queensland,                    Tel: int +61 7 3365 5888
Isles Rd, Indooroopilly,                         Fax: int +61 7 3365 5999
Brisbane Qld 4068, AUSTRALIA.