lua-users home
lua-l archive

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


I'd like to be able to intercept set/get of value to 
lua varibales.

Lets me explain with an example. Each time the 'sym' 
variable is used as lvalue or it is evaluated into an
expression, id like to call back some piece of 'C'

    sym = 10

in this case id like the callback to receive something
like: myLvalueCallback(sring varName, double value)

    a = sym

in this case id like my callback return the value of
the sym. double myExprCallback(varName)

The purpose of this is to use lua as language for
a bench, the 'sym' variables will behave like port
to hardware specific registers...

any sugestion?

the metatable have some features allowing the 
catch of some events, but they dont seem be useful
to solve my problem...

thank u..