Datasheet
You do not rename the library, lua5.1.dll, because references to it are embedded in the interpreter and
compiler.
Type lua -v and luac -v from any working directory to make sure the two programs are accessible on the
search path.
An additional nicety is to add the Lua icon to this directory. You can copy the icon named
lua.ico in
the
etc directory of the Lua source package to the utility directory.
Additional Tools
While on the topic of getting situated with Lua, a few notes about programming editors and script man-
agement are appropriate. Although these tools and methods are not required to create programs, their
use definitely makes you more productive.
Programmer’s Editor
One tool you want to choose carefully is your text editor. You’ll use it not only to create Lua scripts, but
also to read and search through them. A vast number of free and commercial text editors are available
for all mainstream platforms. Wikipedia has a comprehensive summary of their availability and features
at
http://en.wikipedia.org/wiki/Comparison_of_text_editors. Programmer’s editors provide
features well beyond the basic editing of text including features such as the following:
❑ Advanced search and replace using regular expressions, a powerful form of recognizing pat-
terns in text
❑ Syntax highlighting that gives you visual confirmation that your script is properly structured
❑ Multiple undoing and redoing
❑ Bracket matching
❑ The capability to automatically hide portions of text and code
❑ Macros to automatically repeat time-consuming or error-prone operations
❑ The capability to filter selected portions of text through an external program (that is, one written
in Lua) to process text in ways that might be awkward or complicated using the editor’s own
commands
Most programmer’s editors enable you to configure syntax highlighting for various programming lan-
guages, and syntax highlighting for Lua is provided as part of many editor packages. An editor’s high-
lighting mechanism might have trouble with Lua’s novel way of handling multiline comments and
strings, but you can usually configure it to handle those constructions at least gracefully if not perfectly.
21
Chapter 1: Getting Situated
04_069172 ch01.qxp 1/2/07 7:53 PM Page 21