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
Like this
1Activity
0 of .
Results for:
No results containing your search query
P. 1
refman-3.2

refman-3.2

Ratings: (0)|Views: 0|Likes:
Published by Mikhail Miguel

More info:

Published by: Mikhail Miguel on Feb 12, 2012
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

10/18/2013

pdf

text

original

 
ReferenceManualoftheProgrammingLanguageLua3.2  
RobertoIerusalimschyLuizHenriquedeFigueiredoWaldemarCele
lua@tecgraf.puc-rio.br 
TeGraf 
|ComputerScienceDepartment|PUC-Ri
$Date:1999052720:21:03 
Abstract 
Luaisaprogramminglanguageoriginallydesignedforextendingapplications,butalsofrequentlyusedasageneral-purpose,stand-alonelanguage.Luacombinessimpleproceduralsyn- taxsimilartoPascalwithpowerfuldatadescriptionconstructsbasedonassociativearraysand extensiblesemantics.Luaisdynamicallytyped,interpretedfrombytecodes,andhasautomatimemorymanagementwithgarbagecollection,makingitidealforconguration,scripting,and rapidprototyping. Thisdocumentdescribesversion3.2oftheLuaprogramminglanguageandtheAPIthaallowsinteractionbetweenLuaprogramsandtheirhostCprograms
Sumari
Luaeumalinguagemdeprograma caooriginalmenteprojetadaparaextensaodeaplica coes, queetambemfrequentementeusadacomoumalinguagemdeprop ositogeral.Luacombina umasintaxeproceduralsimplessimilaraPascalcompoderosasfacilidadesparadescri caoddadosbaseadasemtabelasassociativaseumasemanticaestensvel.Luatemtipagemdin^ amicaeinterpretadaviabytecodes,etemgerenciamentoautom aticodemem oriacomcoletadelixo, tornando-seidealparacongura cao,scripting,eprototipagemr apida.  Estedocumentodescreveaversao3.2dalinguagemdeprograma caoLuaeaInterfacede  Programa caoAPIquepermiteaintera caoentreprogramasLuaeprogramasChospedeiros
 
Copyright 
 
19941999TeCGraf,PUC-Rio.Allrightsreserved. Permissionisherebygranted,withoutwrittenagreementandwithoutlicenseorroyaltyfees,tousecopy,modify,anddistributethissoftwareanditsdocumentationforanypurpose,includingcommercial applications,subjecttothefollowingconditions: 
 
Theabovecopyrightnoticeandthispermissionnoticeshallappearinallcopiesorsubstantial portionsofthissoftware
 
Theoriginofthissoftwaremustnotbemisrepresented;youmustnotclaimthatyouwrottheoriginalsoftware.Ifyouusethissoftwareinaproduct,anacknowledgmentintheproduct documentationwouldbegreatlyappreciatedbutitisnotrequired
 
Alteredsourceversionsmustbeplainlymarkedassuch,andmustnotbemisrepresentedasbeing theoriginalsoftware. Theauthorsspecicallydisclaimanywarranties,including,butnotlimitedto,theimpliedwarranties ofmerchantabilityandtnessforaparticularpurpose.Thesoftwareprovidedhereunderisonanas is"basis,andtheauthorshavenoobligationtoprovidemaintenance,support,updates,enhancementsormodications.InnoeventshallTeCGraf,PUC-Rio,ortheauthorsbeheldliabletoanypartyfor direct,indirect,special,incidental,orconsequentialdamagesarisingoutoftheuseofthissoftwareand itsdocumentation. TheLualanguageandthisimplementationhavebeenentirelydesignedandwrittenbyWaldemarCelesRobertoIerusalimschyandLuizHenriquedeFigueiredoatTeCGraf,PUC-Rio. Thisimplementationcontainsnothird-partycode
 
Content
1Introduction2EnvironmentandChunks3TypesandTags4TheLanguage
4.1LexicalConventions....................................4.2ThePre-processor.....................................4.3Coercion...........................................4.4Adjustment.........................................4.5Statements.........................................4.5.1Blocks........................................4.5.2Assignment.....................................4.5.3ControlStructures.................................4.5.4FunctionCallsasStatements...........................4.5.5LocalDeclarations.................................4.6Expressions.........................................4.6.1BasicExpressions..................................4.6.2ArithmeticOperators...............................4.6.3RelationalOperators................................4.6.4LogicalOperators.................................4.6.5Concatenation...................................4.6.6Precedence.....................................4.6.7TableConstructors.................................4.6.8FunctionCalls...................................4.6.9FunctionDenitions................................14.7VisibilityandUpvalues...................................14.8TagMethods........................................14.9ErrorHandling.......................................1
5TheApplicationProgramInterface1
5.1ManagingStates......................................15.2ExchangingValuesbetweenCandLua..........................15.3GarbageCollection.....................................15.4ExecutingLuaCode....................................25.5ManipulatingLuaObjects.................................25.6CallingLuaFunctions...................................25.7CFunctions.........................................25.8ReferencestoLuaObjects.................................2
6PredenedFunctionsandLibraries2
6.1PredenedFunctions....................................26.2StringManipulation....................................36.3MathematicalFunctions..................................36.4IOFacilities........................................3

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)//-->