From 4f4cc4f669ed7bd46a1df3911f2240617aae512b Mon Sep 17 00:00:00 2001 From: TsT Date: Thu, 19 Feb 2015 23:11:07 +0100 Subject: goto is a reserved identifier : Fix the sample for use to be Lua >= 5.2 compatible --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2f19b4b..33338ef 100644 --- a/README.md +++ b/README.md @@ -25,9 +25,10 @@ Usage -- io.stdout is the default if you don't specify one term.clear() -- clears the screen term.cleareol() -- clears from the cursor to the end of the line - term.cursor.goto(1, 1) + --term.cursor.goto(1, 1) -- It will fail in Lua >= 5.2 because goto is a reserved word. + term.cursor['goto'](1, 1) -- This will work on Lua >= 5.2, please use jump instead term.cursor.jump(1, 1) -- jump is just an alias for goto - term.cursor.goto(io.stdout, 1, 1) + term.cursor.jump(io.stdout, 1, 1) term.cursor.goup(1) term.cursor.godown(1) term.cursor.goright(1) -- cgit v1.2.3-55-g6feb