ebook img

Programming in Lua, Third Edition PDF

604 Pages·2013·2.23 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Programming in Lua, Third Edition

Table of Contents Preface I. The Language 1. Getting Started Chunks Some Lexical Conventions Global Variables The Stand-Alone Interpreter 2. Types and Values Nil Booleans Numbers Strings Tables Functions Userdata and Threads 3. Expressions Arithmetic Operators Relational Operators Logical Operators Concatenation The Length Operator Precedence Table Constructors 4. Statements Assignment Local Variables and Blocks Control Structures break, return, and goto 5. Functions Multiple Results Variadic Functions Named Arguments 6. More about Functions Closures Non-Global Functions Proper Tail Calls 7. Iterators and the Generic for Iterators and Closures The Semantics of the Generic for Stateless Iterators Iterators with Complex State True Iterators 8. Compilation, Execution, and Errors Compilation Precompiled Code C Code Errors Error Handling and Exceptions Error Messages and Tracebacks 9. Coroutines Coroutine Basics Pipes and Filters Coroutines as Iterators Non-Preemptive Multithreading 10. Complete Examples The Eight-Queen Puzzle Most Frequent Words Markov Chain Algorithm II. Tables and Objects 11. Data Structures Arrays Matrices and Multi- Dimensional Arrays Linked Lists Queues and Double Queues Sets and Bags String Buffers Graphs 12. Data Files and Persistence Data Files Serialization 13. Metatables and Metamethods Arithmetic Metamethods Relational Metamethods Library-Defined Metamethods Table-Access Metamethods 14. The Environment Global Variables with Dynamic Names Global-Variable Declarations Non-Global Environments Using _ENV _ENV and load 15. Modules and Packages The require Function The Basic Approach for Writing Modules in Lua Using Environments Submodules and Packages 16. Object-Oriented Programming Classes Inheritance Multiple Inheritance Privacy The Single-Method

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.