Search results
Results from the WOW.Com Content Network
The-- compress option compresses the table so that it can be iterated over with-- ipairs.-----function p. numData (t, compress) checkType ('numData', 1, t, 'table') checkType ('numData', 2, compress, 'boolean', true) local ret = {} for k, v in pairs (t) do local prefix, num = mw. ustring. match (tostring (k), '^([^0-9]*)([1-9][0-9]*)$') if num ...
Also, we keep a record-- in the metatable of when pairs and ipairs have been called, so we do not-- run pairs and ipairs on the argument tables more than once. We also do -- not run ipairs on fargs and pargs if pairs has already been run, as all -- the arguments will already have been copied over. --]] metatable . __index = function ( t , key ...
The functioncall is written as some.function.name(a,b,c) where some.function.name means something in the Extension:Scribunto/Lua reference manual and a,b,c are the arbitrary variable names you've chosen.
Also, we keep a record-- in the metatable of when pairs and ipairs have been called, so we do not-- run pairs and ipairs on the argument tables more than once. We also do -- not run ipairs on fargs and pargs if pairs has already been run, as all -- the arguments will already have been copied over. --]] metatable . __index = function ( t , key ...
The-- compress option compresses the table so that it can be iterated over with-- ipairs.-----function p. numData (t, compress) checkType ('numData', 1, t, 'table') checkType ('numData', 2, compress, 'boolean', true) local ret = {} for k, v in pairs (t) do local prefix, num = mw. ustring. match (tostring (k), '^([^0-9]*)([1-9][0-9]*)$') if num ...
This module includes a number of set operations for Lua tables. It currently has union, intersection and complement functions for both key/value pairs and for values only. . It is a meta-module, meant to be called from other Lua modules, and should not be called directly from #invo
Mr. Stradivarius: I discovered that calling ipairs() on args and then breaking out of the loop early will unnecessarily result in all of the numeric arguments being expanded, instead of just the ones that were iterated over. I added a test case for this and implemented a fix in the sandbox.
Also, we keep a record-- in the metatable of when pairs and ipairs have been called, so we do not-- run pairs and ipairs on the argument tables more than once. We also do -- not run ipairs on fargs and pargs if pairs has already been run, as all -- the arguments will already have been copied over. --]] metatable . __index = function ( t , key ...