Template:FL digit78
From Metabolomics.JP
(Difference between revisions)
Line 5: | Line 5: | ||
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 (L[ | + | if (L[s] == nil) then L[s]=h end |
end | end | ||
table.sort(L) | table.sort(L) | ||
− | table.foreach(L, function(x) print( x .. " " .. | + | table.foreach(L, function(x) print( L[x] .. " " .. x .. " ") end) |
| {{#SearchTitle:^{{{1}}}|}} }}| }} | | {{#SearchTitle:^{{{1}}}|}} }}| }} |