Difference between revisions of "Basic Concepts"

From GiderosMobile
(Created page with "Lua was created in 1993 by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes, members of the Computer Graphics Technology Group at PUC-Rio, the Pontifical...")
 
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(One intermediate revision by the same user not shown)
Line 7: Line 7:
 
Let’s start with printing a sentence, by writing down the following and running in Gideros Studio:
 
Let’s start with printing a sentence, by writing down the following and running in Gideros Studio:
  
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
print ("Hello, Gideros Studio")
 
print ("Hello, Gideros Studio")
</source>
+
</syntaxhighlight>
  
 
Here print() is a Lua function. We invoke a function using a paranthesis, and print takes the text between double quotes and writes to standard output.
 
Here print() is a Lua function. We invoke a function using a paranthesis, and print takes the text between double quotes and writes to standard output.
Line 15: Line 15:
 
We use "--" to start a comment, or use --[[ to start a mult-line comment. Consider this example:
 
We use "--" to start a comment, or use --[[ to start a mult-line comment. Consider this example:
  
<source lang="lua>
+
<syntaxhighlight lang="lua>
 
--[[ This is a multi-line Lua comment
 
--[[ This is a multi-line Lua comment
 
             Where comment goes on and on...
 
             Where comment goes on and on...
 
             And on...
 
             And on...
 
]]
 
]]
</source>
+
</syntaxhighlight>

Latest revision as of 14:27, 13 July 2023

Lua was created in 1993 by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes, members of the Computer Graphics Technology Group at PUC-Rio, the Pontifical University of Rio de Janeiro. Gideros Studio benefits from Lua, a powerful, fast, lightweight, embeddable scripting language. Lua’s power comes from its simplicity and speed. Lua is mentioned as the fastest language among all interpreted scripting languages.

Lua is used in commercial applications, including Adobe's Photoshop Lightroom, World of Warcraft, Far Cry, Garry's Mod, Supreme Commander and Sonic the Hedgehog. It’s widely used in many applications, where speed and convenience is sought. You also write your applications in Lua inside Gideros Studio, however can also extend your apps with other languages like Objective-C, C++, C or Java.

Despite the size of the Lua interpreter (about 150Kb in size), Lua is a very rich, extensive and expandable programming language. Applications written using Lua looks very clean and understandable, yet effective.

Let’s start with printing a sentence, by writing down the following and running in Gideros Studio:

print ("Hello, Gideros Studio")

Here print() is a Lua function. We invoke a function using a paranthesis, and print takes the text between double quotes and writes to standard output.

We use "--" to start a comment, or use --[[ to start a mult-line comment. Consider this example:

--[[ This is a multi-line Lua comment
            Where comment goes on and on...
             And on...
]]