-
Posted by Begryphon on Wed, 21 Jul 2010 16:03:26
I'm working on page 71 of the second edition. I would like to be able to type files in textEdit and run them in the Lua interpreter. How do I do that?
-
Posted by jnwhiteh on Wed, 21 Jul 2010 16:05:35
Save the file and then call the Lua interpreter giving the filename. For example if you name it foo.lua:
lua foo.lua
That will run the code in the file. If you want to run the file and then open the interpreter afterwards so you can examine the data:
lua -i foo.lua
-
Posted by Begryphon on Wed, 21 Jul 2010 17:53:56
Many thanks for the quick response.