Questions about this topic? Sign up to ask in the talk tab.

Difference between revisions of "LUA"

From NetSec
Jump to: navigation, search
Line 1: Line 1:
LUA is a portable [[interpreted languages|interpreted language]] used both by [[nmap|NMAP]] and ironically the MMORPG World of Warcraft.
+
Lua is a portable [[interpreted languages|interpreted language]]. It is mainly used in Games, however it is also used by [[nmap|NMAP]]'s Scripting Engine
 +
 
 +
 
 +
 
 +
=Variables=
 +
In Lua, variables are very simple, you don't even have to declare a datatype, all you need to do is assign a value.
 +
{{code|text=
 +
<source lang="lua">
 +
Var = 0
 +
</source>
 +
}}
 +
==Global Variables vs Local Variables==
 +
When you declare a variable in Lua, it is globally accessible unless otherwise specified with ''local''.
 +
 
 +
{{code|text=
 +
<source lang="lua">
 +
GlobalVar = 0
 +
</source>
 +
}}
 +
 
 +
 
 +
{{code|text=
 +
<source lang="lua">
 +
local LocalVar = 0
 +
</source>
 +
}}
 +
 
 
[[Category:Programming Languages]]
 
[[Category:Programming Languages]]
  
 
{{programming}}{{social}}
 
{{programming}}{{social}}

Revision as of 19:39, 4 May 2012

Lua is a portable interpreted language. It is mainly used in Games, however it is also used by NMAP's Scripting Engine


Variables

In Lua, variables are very simple, you don't even have to declare a datatype, all you need to do is assign a value.

 
Var = 0
 

Global Variables vs Local Variables

When you declare a variable in Lua, it is globally accessible unless otherwise specified with local.

 
GlobalVar = 0
 


 
local LocalVar = 0
 
LUA is part of a series on programming.
<center>
</center>