Template:FL digit78

From Metabolomics.JP
(Difference between revisions)
Jump to: navigation, search
Line 2: Line 2:
 
{{#lua:
 
{{#lua:
 
   local L = {}
 
   local L = {}
  local C = {}
 
 
   local h
 
   local h
  local i = 0
 
 
   for word in stdin:gmatch("%S+")
 
   for word in stdin:gmatch("%S+")
 
     do h = string.sub(word,1,8) s = string.sub(word,7,8)
 
     do h = string.sub(word,1,8) s = string.sub(word,7,8)
       if (C[h] == nil) then C[h]=s; L[i]=s; i=i+1 end
+
       if (L[h] == nil) then L[h]=s end
 
     end
 
     end
 
   table.sort(L)
 
   table.sort(L)
   for i=1,(# L) do
+
   table.foreach(L, function(x) print( x .. " " .. L[x] .. " ") end)
    print(i .. " " .. L[i] .. " ")
+
  end
+
 
| {{#SearchTitle:^{{{1}}}|}} }}| }}
 
| {{#SearchTitle:^{{{1}}}|}} }}| }}

Revision as of 18:26, 20 March 2008

Personal tools
Namespaces

Variants
Actions
Navigation
metabolites
Toolbox