Sandbox92

From Metabolomics.JP
(Difference between revisions)
Jump to: navigation, search
Line 4: Line 4:
 
id4s = "["
 
id4s = "["
 
for id in string.gmatch("{{#get:34[]}}", "%S+") do
 
for id in string.gmatch("{{#get:34[]}}", "%S+") do
   id3s = id3s .. string.sub(id, 0, 1)
+
   id3s = id3s .. string.sub(id, 1, 1)
   id4s = id4s .. string.sub(id, 1, 2)
+
   id4s = id4s .. string.sub(id, 2, 2)
 
end
 
end
 
id3s = id3s .. "]"
 
id3s = id3s .. "]"
 
id4s = id4s .. "]"
 
id4s = id4s .. "]"
 
print(id3s .. id4s)
 
print(id3s .. id4s)
|}}
 

Revision as of 22:14, 25 January 2009

{{#lua: local id, id3s, id4s id3s = "[" id4s = "[" for id in string.gmatch("", "%S+") do

 id3s = id3s .. string.sub(id, 1, 1)
 id4s = id4s .. string.sub(id, 2, 2)

end id3s = id3s .. "]" id4s = id4s .. "]" print(id3s .. id4s)

Personal tools
Namespaces

Variants
Actions
Navigation
metabolites
Toolbox