Lua

Learning “Lua”

Kumar Satyam (Monday, March 16, 2015)

What is Lua?

Lua is extensible light weight programming language written in C. It started as an in-house project in 1993 by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes.

It was designed from the beginning to be a software that can integrated with code written in C and other conventional languages. This integration brings many benefits. It does not try to do what C can already do but aims at offering what C is not good for: a good distance from the hardware, dynamic structures, no redundancies, ease of testing and debugging. For this, Lua has a safe environment, automatic memory management, and good facilities for handling strings and other kinds of data with dynamic size.

How to start learning it?

Install: Take LuaForWindows_v5.1.4-46.exe from below link and install it:

https://code.google.com/p/luaforwindows/downloads/detail?name=LuaForWindows_v5.1.4-46.exe&can=2&q=

Study Material: http://www.tutorialspoint.com/lua/

 

SciTE and Lua (Command Line) are installed.

 

Let us start with SciTE

 

Click on “Launch Interactive Lua” icon

Now write print(“Abcd…”)

Still Tool > Compile is inactive

Click on Save icon brouse folder, give someName.lua and press OK.

Now it is ready to compile. Either press Compile icon or go to Tool > Compile.

It will compile and “Abcd…” will be printed as output.

 

Commands and compilation outputs are tabulated below:

SN I/P O/P What you learnt
1. print(“Abc…”) Abcd… Printing
2. print(“Abc…”)print(“Def…”) Abc…Def… Printing
3. –print(“Abc…”)print(“Def…”) Def… Commenting
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.

 

One thought on “Lua”

  1. I see your page needs some unique content.
    Writing manually is time consuming, there is tool for this task.
    Just search in gogle for – Fejlando’s tips

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Physics, Electronics and Robotics Concepts