Embed Lua in your program

Source: Internet
Author: User
Tags lua

Original: Http://www.codeproject.com/KB/cpp/lua.aspx

Introduced

This article describes how to embed Lua in your own program.

What is LUA

LUA is an extended programming language (Dynamic parsing language) with simple data descriptions. It provides very good object-oriented programming, functional programming (functional programming), data-driven programming (Data-driven programming), which can be used as a powerful, lightweight scripting language for any program that is needed. Lua is provided in the form of a library written in clean C. (The so-called clean C, refers to the ANSI C and C + + a subset of the Communist pass)

Lua example (for loop)

for i=1,10 do
  -- the first program in every language
  io.write("Hello world, from ",_VERSION,"!\n")
end

Detailed description can refer to the LUA Web site http://www.lua.org/about.html

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.