Lua文件操作和串行化
来源:互联网 发布:电脑日程提醒软件 编辑:程序博客网 时间:2024/05/25 08:13
function n_serialize(data)if type(data)=="number" thenio.write(data,"\n")elseif type(data)=="string" thenio.write(string.format("%q\n",data))elseif type(data)=="table" thenio.write("{\n");for k,v in pairs(data) doio.write("",k,"=")n_serialize(v)--io.write(",\n")endio.write("}\n")elseendendtbl={a=12,b="lua"}n_serialize(tbl)n_serialize(1)n_serialize("Hello World")local fw=assert(io.open("text.txt",'w'))fw:write("Hello World")fw:close()local fr=assert(io.open("text.txt",'r'))print(fr:read("a"))fr:close()
0 0
- Lua文件操作和串行化
- 文件IO和串行化
- 使用MFC的CFile文件类和CArchive串行化类进行二进制文件读写操作
- 文件与串行化
- 使用MFC的CFile文件类和CArchive串行化类进行二进制文件读写操作演示案例
- 对象串行化和反串行化
- MFC Windows程序设计学习笔记--文件和串行化
- lua读文件操作
- lua-文件操作
- lua文件操作详解
- lua文件操作
- lua文件操作
- lua文件读写操作
- lua几点注意和脚本操作gui文件
- 串行化和并行化
- chap8_2 文档和串行化
- 串行化和CArchive类
- Lua的文件读写操作
- Android屏幕适配全攻略(最权威的官方适配指导)
- 仿写Scanner类的功能代码
- Nmap的nmap_mass_rdns函数开始支持IPv6地址
- 华为软件编程规范和范例 1 ——排版和注释
- Android 谷歌 开源 通信框架 VOLLEY(一)
- Lua文件操作和串行化
- Collections类方法详解
- 逻辑与 按位与 逻辑或 按位或 逻辑非 按位非
- JAVA中使用FTPClient上传下载
- 南邮 OJ 1184 迷失的邮票
- Win7(64Bit) 安装 PL/SQL Developer图解
- 如何用JUnit4测试spring service
- [Spark源码剖析] DAGScheduler划分stage
- Failed to initialize the PowerShell host 解决方案