GetCmdLine

GetCmdLine()

Restituisce i parametri della command line o nil se non trovati

Esempio 1. Esempio GetCmdLine

-- GetCmdLine: returns command-line params or empty string (NOT nil as documented)
local params = GetCmdLine()
print("GetCmdLine() = '" .. tostring(params) .. "'")

-- Called without args from lua.exe, returns "" not nil
if params == "" then
  print("OK: empty string as expected (docs incorrectly say nil)")
else
  print("Args received: " .. params)
end