lua-users home
lua-l archive

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

From: "Hakki Dogusan" <>
> My problem is:
> in lua:
> avar=3
> x=afunction(avar)  --afunction's implementation is in c++
> in c++:
> I want to change avar's value when afunction is called (like reference
> in c++).
> Don't know its global name.
> Is it possible?

How about sending the global name as a string, instead of using
the variable?


  x = afunction('avar')

Just a thought.


  Magnus Lie Hetland

 "Reality is that which, when you stop believing in
  it, doesn't go away."           -- Philip K. Dick