lua-users home
lua-l archive

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


What micro-controller are you using? You can configure Lua to use long for
numbers, look for LUA__NUMBER in the header files. The biggest problem is to
use 16 bit pointers, there has been some discussion about this and maybe
there is support - I'm not sure.

/Erik

-----Oprindelig meddelelse-----
Fra: owner-lua-l@tecgraf.puc-rio.br
[mailto:owner-lua-l@tecgraf.puc-rio.br]På; vegne af Andrew Teirney
Sendt: 5. februar 2003 13:51
Til: Multiple recipients of list
Emne: Lua and adding types


Hi there,

    I just happened to stumble across Lua while searching the internet for
something totally unrelated.

    None the less it appears as though Lua might be perfect for a particular
job that i am currently designing, except for one small part. That is the
intended environment for Lua is an embedded micro controller, a 16-bit micro
controller to be precise. The actual function of the Lua language is to
interface with native module and control the overall operation of a great
portion of work. It is done this was as runtime configuration for this type
of device is best described in some form of language.

    Anyway due to the micro-controller nature of the system using floating
point numbers for all number operations can be considered rather expensive
in time as opposed to using standard integers. I had thought about modifing
Lua to use just integers but the ability to use decimals will be required at
several points within the operation of the system.

    So in short, what i was wondering is whether anyone has any experience
or could point me in the best direction as to how to implement another base
type perhaps named integer whilst keeping the base type number of which will
most likely be used as a float type for storage size and speed.

Cheers,

    Andrew Stanley Teirney