[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: function call as lvalue
- From: Alexander Sorockin <sorockin@...>
- Date: Thu, 18 Feb 2010 14:53:25 +0300
Hi All,
I guess the most likely answer to this question is 'No', but just in case. Is there a way to implement in C a function call as an lvalue? Basically, I want my Lua program to be able to do something like this:
m = mymessage.create()
m.byte(1).bits(2, 3) = 2
I know I can implement something like this:
m.byte(1).bits(2, 3).set(2)
or this:
m.byte[1].bits[2][3] = 2
But the former looks more elegant to me :)
Cheers,
Sandy