title: What does this LUA line mean? ""%i (%.3f GHz)" %{ f.channel, f.mhz / 1000 })"
body: <p>I have a question concerning to this snippet of code</p>
  
  <pre><code>ch = s:taboption("general", Value, "channel", translate("Channel"))
  ch:value("auto", translate("auto"))
  for _, f in ipairs(iw and iw.freqlist or { }) do
      if not f.restricted then
         ch:value(f.channel, "%i (%.3f GHz)" %{ f.channel, f.mhz / 1000 }) //this line?
      end
  end
  </code></pre>
  
  <p>What is doing the line?</p>
  
  <pre><code>ch:value(f.channel, "%i (%.3f GHz)" %{ f.channel, f.mhz / 1000 })
  </code></pre>
  
  <p>I think it is assigning some value to ch but I cannot understand which one, because I cannot understand completely what this section does <em>"%i (%.3f GHz)" %{ f.channel, f.mhz / 1000 }</em></p>
  
  <p>Thanks in advance!</p>
  
  <p>Complete code</p>
  
  <pre><code>-- Check whether there is a client interface on the same radio,
  -- if yes, lock the channel choice as the station will dicatate the freq
  local has_sta = nil
  local _, net
  for _, net in ipairs(wdev:get_wifinets()) do
      if net:mode() == "sta" and net:id() ~= wnet:id() then
          has_sta = net
          break
      end
  end
  
  if has_sta then
      ch = s:taboption("general", DummyValue, "choice", translate("Channel"))
      ch.value = translatef("Locked to channel %d used by %s",
          has_sta:channel(), has_sta:shortname())
  else
      ch = s:taboption("general", Value, "channel", translate("Channel"))
      ch:value("auto", translate("auto"))
      -- for _, f in ipairs(iw and iw.freqlist or { }) do
      for _.iw.chanlist, f in ipairs(iw and iw.freqlist or iw.channels) do
          if not f.restricted then
              ch:value(f.channel, "%i (%.3f GHz)" %{ f.channel, f.mhz / 1000 })
          end
      end
  end
  </code></pre>