Volatile:ListField

From Metabolomics.JP
(Difference between revisions)
Jump to: navigation, search
m
Line 1: Line 1:
<!----List fields of name "<nowiki>{{{1|}}}</nowiki>" in namespace "<nowiki>{{{2}}}</nowiki>".---->{{#lua:
+
<!----List fields of name "<nowiki>{{{1}}}</nowiki>" in namespace "<nowiki>{{{2}}}</nowiki>", if the list size is more than <nowiki>{{{3}}}</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 17: Line 17:
 
   table.sort(id)
 
   table.sort(id)
 
   for _,v in ipairs(id) do
 
   for _,v in ipairs(id) do
     if (table.getn(list[v] > {{{3|0}}}) then
+
     if (table.getn(list[v] > {{{3{{#bar:}}0}}}) then
 
       print("* {{{1}}} '''" .. v .. "'''")
 
       print("* {{{1}}} '''" .. v .. "'''")
 
       table.sort(list[v])
 
       table.sort(list[v])

Revision as of 15:04, 8 September 2011

Personal tools
Namespaces

Variants
Actions
Navigation
metabolites
Toolbox