title: Lua 4 to Lua 5.3 statement
body: <p>I found a Lua 4 script for text justification in this site: [<a href="http://lua-users.org/wiki/TextJustification][1]" rel="nofollow noreferrer">http://lua-users.org/wiki/TextJustification][1]</a>. I try re-write the script to  Lua 5.3 scripts.
  Belows, which I don't know how to write in Lua 5.3 statement:</p>
  
  <pre><code>    if not arg or getn(arg) &lt; 1 then
       MAX = DEFMAX
      else
       MAX = tonumber(arg[1])
       if not MAX or MAX &lt; 0 then MAX = DEFMAX end
      end
  </code></pre>
  
  <p>and this part:</p>
  
  <pre><code>  _, n = gsub(line, "(%S+)", function (s) q_insert(%text, s) end)
  </code></pre>
  
  <p>How to re-write in Lua 5.3?</p>