Source: http://www.cppblog.com/Leaf/archive/2009/05/16/83145.html
It is said that the author of this article is ogdev's hack master.
Use examples to learn about Lua (1) ---- Hello World
1. PrefaceThe scripting language is indispensable in
Summary:In server development using C + +, scripting techniques are often used, and Lua is one of the best embedded scripts. The lightweight, compact and simple concept of Lua makes him more and more popular. I have also used Python to do embedded
First, the basic knowledge:
1. First Program and function:in the current learning phase, the best way to run a LUA program is through LUA's own interpreter programs, such as:
Copy Code code as follows:
/> Lua
> Print ("Hello World")
Note: The original text was also issued in the company's internal forum
The stack that LUA interacts with C is an important concept. The article first explains why you should introduce the LUA stack, then summarizes the APIs that are commonly used
--------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------Like my blog Please remember my name: Qin Yuanpei , my blog
--------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------Like my blog Please remember my name: Qin Yuanpei , my blog
Reprint Source: http://my.oschina.net/xhan/blog/309613Description: This document is a lua.ps file in the doc directory of Lua1.1.At the same time this document can be found here: http://www.lua.org/semish94.htmlThe original copyright belongs to the
What is the environment?http://www.lua.org/manual/5.1/manual.html#2.9
Besides Metatables, objects of types thread, function, and UserData has another table associated with them, called their Environment. Like Metatables, environments is
Chinese version of programming in Lua -- 8. Compilation, execution, and errors Transferred from http://www.lifangjin.com/(liangfeng collection Li fangjin's personal blog)Although we use Lua as an interpreted language Code Pre-editing is translated
Redis supports LUA scripts from 2.6, similar to the functionality of transactions, where multiple Redis commands can be executed by the Lua script atom. Redis provides the eval and Evalsha commands to execute LUA scripts.Create and modify LUA's bad
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.