Template:Index/mass: Difference between revisions

No edit summary
 
No edit summary
 
Line 13: Line 13:
|- style="background:#ccf"
|- style="background:#ccf"
{{#repeat:IndexTable|1|
{{#repeat:IndexTable|1|
{{#lua:
{{#invoke:Index|MassIndexTable|{{#if:{{{4|}}}| {{#extmass:{{{3|FL1C99}}}}}| {{#avemass:{{{3|FL1C99}}}}} }}|{{{1}}}|{{{2}}}}}
  local id, ms, msd;
  local min = {{{1|0}}};
  local max = {{{2|2000}}};
  local hash = {};
  local idx = {};
  for id, ms in stdin:gmatch("&&(%w+)&&([%d\.]+)") do
    msd = tonumber(ms); ---質量の最小と最大の間に入る部分のみ考慮
    if ((msd >= min) and (msd <= max)) then
      if (hash[msd] == null)
        then hash[msd] = id;
          table.insert(idx, msd);
        else hash[msd] = hash[msd].."&&"..id;
      end
    end
  end
  table.sort(idx);
  local output = "";
  for id, val in pairs(idx) do
    output = output .. val .."&&".. hash[val] .. "\n";
  end
  print(output);
|{{#if:{{{4|}}}| {{#extmass:{{{3|FL1C99}}}}}| {{#avemass:{{{3|FL1C99}}}}} }}
}}
}}
}}
|}
|}

Latest revision as of 05:41, 3 February 2023

質量のインデクス: {{{1}}} 最小値(デフォルト0) {{{2}}} 最大値(デフォルト1万) {{{3}}} 検索ページタイトル {{{4}}} true/nil EXTMASS と AVGMASSの選択 This page is automatically generated using Persist function (Last updated: 20230203054156).

{{#persist:Index (average mass 0-0)|0-0|Template:Index/mass|4|0;0;{{{3}}};}} [[Index:{{{3}}}|Back to Index]] {{#persist:Index (average mass 0-0)|0-0|Template:Index/mass|4|0;0;{{{3}}};}}