Lua for Windows 开始学习Lua编程
来源:互联网 发布:2017淘宝双11晚会视频 编辑:程序博客网 时间:2024/04/19 04:57
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
当前版本:5.1.4-45
下载之后,在安装目录"...\Lua\5.1\SciTE"下,打开SciTE.exe文件,新建一个文档,保存为"hello.lua",文档内容如下:
print("hello,lua")
按下F5,在下面的输出窗口将会有如下内容: 1
2
3
2
3
>lua -e "io.stdout:setvbuf 'no'" "hello.lua"
hello,lua
>Exit code: 0
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
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()
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",回车,效果如下所示:
- Lua for Windows 开始学习Lua编程
- Lua for Windows 开始学习Lua编程
- lua for windows学习教程-1
- Lua for学习
- 如何学习Lua编程
- 如何学习Lua编程
- Lua编程学习
- torch:LUA编程学习
- Lua for Windows 安装方法
- Lua学习笔记 第一章 开始
- 开始lua学习记录旅程
- Lua 开始
- Lua学习笔记之for
- 开始学习LUA,在LUA中使用UNICODE字符串
- 学习笔记 : Lua 编程技巧
- Lua编程学习及资源
- 准备学习使用lua编程,
- Lua For windows 编辑器的使用
- python的socket编程实例
- Changing the Favicon in PeopleSoft
- 木马生成技术详解
- C++语言复习九 类的继承 三种方式
- 终于真正理解SQL Server convert()函数啦
- Lua for Windows 开始学习Lua编程
- 远程调试编译LINUX,UNIX应用程序组件
- 常用git命令
- LiyaLogUtil
- Windows平台下的C++调用Lua
- 定制我的Nexus系统之下载源码
- DbGrid 禁止横向移动
- Twitter在移动广告上的成功值得Facebook借鉴
- java线程的暂停与唤醒测试