io.flush()

类型 函数
io.*
返回值
修订版 发行版 2024.3703
关键字 io、flush、文件
另请参阅 io.output()
io.write()

概览

刷新默认输出文件。相当于 io.output(): flush

如果 io.output 未从其默认输出(stdout)更改,这将刷新任何 io.write 或将打印数据刷新至 Corona Simulator 控制台、Xcode 控制台或 Console.app

语法

io.flush()

示例

io.write( "My console data\n" ) -- write the string to console
io.write( "My console data 2\n" ) -- write the string to console
 
io.flush()