About This Book "Lua Programming" is a textbook for high school and college students; it covers all essential Lua language knowledge. You can learn complete primary skills of Lua programming fast and easily. The textbook includes a lot of practical examples for beginners and includes exercises for the college final exam, the engineer certification exam, and the job interview exam. "Lua Programming" is a useful textbook for beginners. The straightforward definitions, the plain examples, the elaborate explanations and the neat layout feature this helpful and educative book. You will be impressed by its distinctive and tidy writing style. Reading this book is a great enjoyment!
Note This book is only suitable for Lua programming beginners, high school students and college students; it is not for the experienced Lua programmers.
Table of Contents
Hour 1 What is Lua Language? Install Lua “Hello World” Script Lua Comment Identifier Lua Reserved Keywords Data Type Check Data Type Variable Nil Global & Local
Hour 2 String Escape Character String Length & Reverse String Format #string, find() & sub() Connect & Repeat Conversion & Replace Character & Ascii Arithmetical Operators Comparison Operators Logical Operators
Hour 3 Precedence of Operators While Loop For Loop For … In ipairs() Repeat---Until() Break Statement Go To Statement Nested Loop If Statement
Hour 4 If-else Statement Function Function with Arguments Return Uncertain Parameters Anonymous Function (1) Anonymous Function (2) How Many Parameters? Array Access Array Elements Table Iterate Over Table
Hour 6 _ _newindex Method _ _tostring Method Other Meta_Methods File I/O Write a File Read a File Append a File Read() Parameters Process Multiple Files Locate a String
Hour 7 Class Object Constructor Inheritance Overriding Coroutine