Template:FL digit78
From Metabolomics.JP
(Difference between revisions)
(New page: {{#lua: local L = {} for word in stdin:gmatch("%S+") do s = string.sub(word,7,8) if (L[s] == nil) then L[s]=s end end table.sort(L) print(table.concat(L)) | {{#Searc...) |
|||
| (32 intermediate revisions by one user not shown) | |||
| Line 1: | Line 1: | ||
| + | {{#repeat: MapLink|3| | ||
{{#lua: | {{#lua: | ||
local L = {} | local L = {} | ||
| + | local C = {} | ||
| + | local h, j | ||
| + | local i = 0 | ||
for word in stdin:gmatch("%S+") | for word in stdin:gmatch("%S+") | ||
| − | do s = string.sub(word,7,8) | + | do h = string.sub(word,1,8) s = string.sub(word,7,8) |
| − | + | if (C[s] == nil) then | |
| + | C[s]=s | ||
| + | i=i+1 | ||
| + | L[i]=s .. h | ||
| + | end | ||
end | end | ||
table.sort(L) | table.sort(L) | ||
| − | print( | + | for j=1,i do |
| − | | {{#SearchTitle:^ | + | print( "ListMol " .. string.sub(L[j],3,10) .. " " .. string.sub(L[j],1,2) .. " ") |
| + | end | ||
| + | | {{#SearchTitle:^{{{1}}}|}} }}| }} | ||