tech-userlevel archive

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

Re: proplib and the jet age

Jan Danielsson wrote:
>    I encountered a few minor annoyances, mostly due to my old format
> having a few shortcuts. For instance:
>    myproj.max_elements=64K
>    myproj.max_store=8G
>    ..and in this particular project that syntax happens a lot. As a
> workaround, I added support for passing strings; "64K", etc, and have
> the application automatically treat them as integers. Not very pretty,
> but I doubt it's an issue for most cases/users. And there's also 64*1024
> etc of one prefers it.

which can be written as

local KB = 1024
local MB = KB*KB
local GB = KB*MB


Local variables will not be visible in the global _G table.


Home | Main Index | Thread Index | Old Index