Talk:Lua/Table Library
Add topicAppearance
< Talk:Lua
Latest comment: 8 years ago by Dave Braunschweig in topic French translation
French translation
[edit source]Hi Dave, i have a problem translating the section "understand your script". The firsts lines say:
local function descending(first, second) declares a local function named descending that accepts two parameters, first and second. return (first > second) returns true if the first is greater than the second, which will result in values being sorted in descending order.
But we can't find it in the code section! I'm thinking in using a larger table with 2 or 3 raw as the test table, but i'll tell you more tomorrow. Yesterday, i translated the text library lesson, and i changed the code part of the g.match() function demo. (in the french version of course). Just for the result being different of the gsub() function. See you! Youni Verciti (discuss • contribs)
- From the code here, look for
function(a, b) return a > b end
. That does the sort. -- Dave Braunschweig (discuss • contribs) 18:19, 6 April 2016 (UTC)- Oups! i now understand the way to invert the sorting order, i will keep the code example wich is the standard one and correct the section "understand your lua script" Done. Youni Verciti (discuss • contribs)