lua-users home
lua-l archive

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

What is the preprocessor that C uses?

I wonder if it could be used with LUA as well

example - I just wrote a StarTrek game in Lua, it would have been good to
be able to say


#define ENTERPRISE 4

if Sector[x..y] = ENTERPRISE then write("+") end

btw1  I used tables:  x=5 y=5  Sector[x..y] = somthng
                       for Sector[55]...

is there a better way? Tables were nice because I did not have to worry
about out of bounds.  This is an opinion question.

btw2  I found that lua 4.0    write() == lua 5.0  io.write ==

So a simple edit/search/replace fixes that.. right?

Is there a place to upload my star trek game? (for comments :^)