Lua for Windows 开始学习Lua编程

本文介绍LuaforWindows,一个专为Windows设计的Lua编程语言开发环境。包括Lua解释器、编译器、文本编辑器等工具,以及丰富的示例代码和文档,适合初学者快速上手。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.youkuaiyun.com/jiangjunshow

也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!

               
        Lua for Windows is a 'batteries included environment' for the Lua scripting language on Windows.这是在Windows上学习Lua的整套开发环境,包含Installer Lua Interpreter, Lua Reference Manual, Quick Lua Tour Sample, Examples directory, Libraries with documentation. Lua Compiler (luac) Text Editors (SciTE and I think maybe wxLua editors too) C header files/libraries/etc. for building C module
项目地址: http://code.google.com/p/luaforwindows/
当前版本:5.1.4-45

        下载之后,在安装目录" ...\Lua\5.1\SciTE"下,打开 SciTE.exe文件,新建一个文档,保存为" hello.lua",文档内容如下:
1
print( "hello,lua")
按下F5,在下面的输出窗口将会有如下内容: 
1
2
3
>lua -e "io.stdout:setvbuf 'no'" "hello.lua"  
hello,lua
>Exit code: 0
运行结果图如下所示:

在" ...\Lua\5.1\examples"目录下,有个" quickluatour.lua"是一些快速入门的示例。其中有个例子,是利用 IupLua显示对话框的,新建一个" test.lua"文件,内容如下: 
1
2
3
4
5
6
7
8
9
10
11
require(  "iuplua" )
ml = iup.multiline
    {
    expand= "YES",
    value= "Quit this multiline edit app to continue Tutorial!",
    border= "YES"
    }
dlg = iup.dialog{ml; title= "IupMultiline", size= "QUARTERxQUARTER",}
dlg:show()
print( "Exit GUI app to continue!")
iup.MainLoop()
保存。在命令提示符下输入" lua test.lua",回车,效果如下所示:

           

给我老师的人工智能教程打call!http://blog.youkuaiyun.com/jiangjunshow
这里写图片描述
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值