From acff6a36c1ec425bf3f920e55c0ee90039647209 Mon Sep 17 00:00:00 2001 From: Pab0 Date: Thu, 21 Jul 2022 16:42:43 +0200 Subject: Update LuaShortReference link The previous PDF location 404's on lua-users.org, so linking to the respective lua-users.org/wiki page instead (which includes working links to the PDFs on Thomas Lauer's website). --- lua.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua.html.markdown') diff --git a/lua.html.markdown b/lua.html.markdown index ac7883b2..32512060 100644 --- a/lua.html.markdown +++ b/lua.html.markdown @@ -406,7 +406,7 @@ I started with Black Next I read the official Programming in Lua book. That's the how. -It might be helpful to check out the Lua short +It might be helpful to check out the Lua short reference on lua-users.org. The main topics not covered are standard libraries: -- cgit v1.2.3 From e34431b31f9d32ac53088163c732b0ec6eef36bf Mon Sep 17 00:00:00 2001 From: Rod Elias Date: Sun, 31 Jul 2022 15:25:11 -0300 Subject: fix typos and minor improvements --- lua.html.markdown | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lua.html.markdown') diff --git a/lua.html.markdown b/lua.html.markdown index 32512060..de71ccd4 100644 --- a/lua.html.markdown +++ b/lua.html.markdown @@ -58,7 +58,7 @@ foo = anUnknownVariable -- Now foo = nil. aBoolValue = false -- Only nil and false are falsy; 0 and '' are true! -if not aBoolValue then print('twas false') end +if not aBoolValue then print('it was false') end -- 'or' and 'and' are short-circuited. -- This is similar to the a?b:c operator in C/js: @@ -193,7 +193,7 @@ end -- A table can have a metatable that gives the table -- operator-overloadish behavior. Later we'll see --- how metatables support js-prototypey behavior. +-- how metatables support js-prototype behavior. f1 = {a = 1, b = 2} -- Represents the fraction a/b. f2 = {a = 2, b = 3} @@ -364,7 +364,7 @@ end)() -- locals inside mod.lua are invisible outside it. -- This works because mod here = M in mod.lua: -mod.sayHello() -- Says hello to Hrunkner. +mod.sayHello() -- Prints: Why hello there Hrunkner -- This is wrong; sayMyName only exists in mod.lua: mod.sayMyName() -- error -- cgit v1.2.3 From 1cfd2d6c0f57720c45e4061abf3cac1c75b026c0 Mon Sep 17 00:00:00 2001 From: Sainan Date: Wed, 19 Jul 2023 00:04:26 +0100 Subject: Update lua.html.markdown --- lua.html.markdown | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'lua.html.markdown') diff --git a/lua.html.markdown b/lua.html.markdown index de71ccd4..166f3749 100644 --- a/lua.html.markdown +++ b/lua.html.markdown @@ -17,10 +17,7 @@ filename: learnlua.lua -- 1. Variables and flow control. ---------------------------------------------------- -num = 42 -- All numbers are doubles. --- Don't freak out, 64-bit doubles have 52 bits for --- storing exact int values; machine precision is --- not a problem for ints that need < 52 bits. +num = 42 -- Numbers can be integer or floating point. s = 'walternate' -- Immutable strings like Python. t = "double-quotes are also fine" -- cgit v1.2.3 From f8c0fd4aeb7697ac1a6832d13e464cda8c982a37 Mon Sep 17 00:00:00 2001 From: Stefan Trost Date: Sun, 21 Jan 2024 20:56:57 +0100 Subject: [lua] Fix url (#4828) --- lua.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua.html.markdown') diff --git a/lua.html.markdown b/lua.html.markdown index 166f3749..f11d67a8 100644 --- a/lua.html.markdown +++ b/lua.html.markdown @@ -399,7 +399,7 @@ If you need support join the official Lua [mailing list](https://www.lua.org/lua I was excited to learn Lua so I could make games with the Love 2D game engine. That's the why. -I started with BlackBulletIV's Lua for programmers. +I started with BlackBulletIV's Lua for programmers. Next I read the official Programming in Lua book. That's the how. -- cgit v1.2.3