Useful Links
Computer Science
Programming
By Language
Lua Programming
1. Introduction to Lua
2. Lua Language Fundamentals
3. Control Flow Structures
4. Functions
5. Tables: Lua's Primary Data Structure
6. Metatables and Metamethods
7. Modules and Package Management
8. Error Handling and Debugging
9. Advanced Language Features
10. Object-Oriented Programming Patterns
11. Standard Library Overview
12. C API Integration
13. Lua Ecosystem and Tools
Lua Language Fundamentals
Basic Syntax and Structure
Comments
Single-Line Comments
Multi-Line Comments
Keywords and Reserved Words
Identifiers and Naming Conventions
Code Blocks and Chunks
Statement Termination
Variables and Scope
Global Variables
Declaration and Assignment
Default Global Scope
Local Variables
Local Declaration with `local`
Variable Lifetime and Visibility
Block Scope
Nested Blocks
Variable Shadowing
Data Types
Nil Type
Representation of Absence
Default Variable Value
Boolean Type
True and False Values
Truthiness and Falsiness Rules
Number Type
Integer Representation
Floating-Point Representation
Numeric Limits and Precision
String Type
String Literals and Quotes
Escape Sequences
Multiline Strings
Function Type
Functions as First-Class Values
Anonymous Functions
Table Type
Table Creation and Structure
Mutability
Userdata Type
Purpose and C API Integration
Thread Type
Coroutine Objects
Operators
Arithmetic Operators
Addition
Subtraction
Multiplication
Division
Modulus
Exponentiation
Unary Minus
Relational Operators
Equality
Inequality
Less Than
Greater Than
Less Than or Equal
Greater Than or Equal
Logical Operators
And Operator
Or Operator
Not Operator
Short-Circuit Evaluation
String Concatenation Operator
Length Operator
String Length
Table Length
Operator Precedence and Associativity
Type Checking and Conversion
The `type()` Function
Automatic Type Coercion
Explicit Type Conversion
String Conversion
Number Conversion
Previous
1. Introduction to Lua
Go to top
Next
3. Control Flow Structures