Volatile:ListField

From Metabolomics.JP
(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
<!----List fields of name "<nowiki>{{{1}}}</nowiki>" in namespace "<nowiki>{{{2}}}</nowiki>", if the list size is more than <nowiki>{{{3}}}</nowiki>---->{{#lua:
+
<!----List fields of name "<nowiki>{{{1}}}</nowiki>" in namespace "<nowiki>{{{2}}}</nowiki>"---->{{#lua:
 
   function trim(s) return (string.gsub(s, "^%s*(.-)%s*$", "%1")) end
 
   function trim(s) return (string.gsub(s, "^%s*(.-)%s*$", "%1")) end
 
   list = {}
 
   list = {}
Line 16: Line 16:
 
   end
 
   end
 
   table.sort(id)
 
   table.sort(id)
   local k = tonumber("{{{3}}}")
+
   local coff = tonumber("{{{3}}}")
   if (k == nil) then k =0 else print("Printing lists more than size=" .. k) end
+
   if (coff == nil) then coff =0 else print("Printing lists more than size=" .. coff) end
 
   for _,v in ipairs(id) do
 
   for _,v in ipairs(id) do
   --- if (table.getn(list[v]) > k) then---
+
   --- if (table.getn(list[v]) > coff) then---
 
       print("* {{{1}}} '''" .. v .. "'''")
 
       print("* {{{1}}} '''" .. v .. "'''")
 
       table.sort(list[v])
 
       table.sort(list[v])

Revision as of 15:49, 8 September 2011

Personal tools
Namespaces

Variants
Actions
Navigation
metabolites
Toolbox