Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword or section
Like this
2Activity
0 of .
Results for:
No results containing your search query
P. 1
Programming in LUA

Programming in LUA

Ratings: (0)|Views: 53|Likes:
Book
Book

More info:

Published by: hector2garcia@yahoo.com on Oct 07, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

01/25/2014

pdf

text

original

 
Programming in Lua
Roberto IerusalimschyJanuary 22, 2003
 
2
 
Contents
1 Introduction 7
I The Language 11
2 Getting Started 13
2.1 Environment and Chunks . . . . . . . . . . . . . . . . . . . . . . 142.2 Some Lexical Conventions . . . . . . . . . . . . . . . . . . . . . . 16
3 Types and Values 194 Expressions 27
4.1 Arithmetic Operators . . . . . . . . . . . . . . . . . . . . . . . . 274.2 Relational Operators . . . . . . . . . . . . . . . . . . . . . . . . . 274.3 Logical Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . 284.4 Concatenation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294.5 Precedence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294.6 Table Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5 Statements 33
5.1 Assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335.2 Local Variables and Blocks . . . . . . . . . . . . . . . . . . . . . 345.3 Control Structures . . . . . . . . . . . . . . . . . . . . . . . . . . 35
6 Functions 417 More About Functions 45
7.1 Closures & Upvalues . . . . . . . . . . . . . . . . . . . . . . . . . 477.2 Variable Number of Arguments . . . . . . . . . . . . . . . . . . . 527.3 Named Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . 53
8 Errors 55
8.1 Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578.2 Error Handling and Exceptions . . . . . . . . . . . . . . . . . . . 583

Activity (2)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->