diff options
| author | TsT <tst2005@gmail.com> | 2015-02-19 23:11:07 +0100 |
|---|---|---|
| committer | TsT <tst2005@gmail.com> | 2015-02-19 23:13:00 +0100 |
| commit | 4f4cc4f669ed7bd46a1df3911f2240617aae512b (patch) | |
| tree | 51ff8e44c7ecf0cdfaa914b8a6fb3373c7b40f77 | |
| parent | 7f7081140d2bbe4d60ba1577a026ca4c6a4873f2 (diff) | |
| download | lua-term-4f4cc4f669ed7bd46a1df3911f2240617aae512b.tar.gz lua-term-4f4cc4f669ed7bd46a1df3911f2240617aae512b.tar.bz2 lua-term-4f4cc4f669ed7bd46a1df3911f2240617aae512b.zip | |
goto is a reserved identifier : Fix the sample for use to be Lua >= 5.2 compatible
| -rw-r--r-- | README.md | 5 |
1 files changed, 3 insertions, 2 deletions
| @@ -25,9 +25,10 @@ Usage | |||
| 25 | -- io.stdout is the default if you don't specify one | 25 | -- io.stdout is the default if you don't specify one |
| 26 | term.clear() -- clears the screen | 26 | term.clear() -- clears the screen |
| 27 | term.cleareol() -- clears from the cursor to the end of the line | 27 | term.cleareol() -- clears from the cursor to the end of the line |
| 28 | term.cursor.goto(1, 1) | 28 | --term.cursor.goto(1, 1) -- It will fail in Lua >= 5.2 because goto is a reserved word. |
| 29 | term.cursor['goto'](1, 1) -- This will work on Lua >= 5.2, please use jump instead | ||
| 29 | term.cursor.jump(1, 1) -- jump is just an alias for goto | 30 | term.cursor.jump(1, 1) -- jump is just an alias for goto |
| 30 | term.cursor.goto(io.stdout, 1, 1) | 31 | term.cursor.jump(io.stdout, 1, 1) |
| 31 | term.cursor.goup(1) | 32 | term.cursor.goup(1) |
| 32 | term.cursor.godown(1) | 33 | term.cursor.godown(1) |
| 33 | term.cursor.goright(1) | 34 | term.cursor.goright(1) |
