[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: #define in C = ?? in Lua
- From: Ron Hudson <rhudson@...>
- Date: Fri, 31 Oct 2003 15:53:59 -0600
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 :^)
ron.