On Mar 9, 2013, at 3:41 AM, Cristian Constantin <[email protected]>
wrote:
> cristian: if I need tag as a number I should use:
>
> tonumber (tostring (tag))
>
> right?
>
You can do it that way - but looking at the C-code it looks like you can also
just do this:
local myval = tag.value
or this:
local myval = tag()
In both of those cases 'myval' will be a Lua number of the tag value as well,
because a FieldInfo object for a "m3ua.parameter_length" field value is a
FT_UINT16 type internally, so getting its value should get you a Lua number.
Any FieldInfo of an internal type FT_FLOAT/DOUBLE/UINTx/INTx will give a Lua
number when its value is retrieved. (except FT_UINT64/FT_INT64) Or at least
the code looks like it will do that, I haven't tried it myself.
-hadriel
___________________________________________________________________________
Sent via: Wireshark-dev mailing list <[email protected]>
Archives: http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
mailto:[email protected]?subject=unsubscribe