lua-users home
lua-l archive

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


Am 20.07.2012 07:00, schrieb Daurnimator:
You're close but you don't have your table constructor right. Try baudrate = { [115200] = "rs232.RS232_BAUD_115200" }

... just in case we are not talking about "mapping" but about "converting without any checks":

ui = 115200
baudrate = "rs232.RS232_BAUD_" .. ui