byghis

vim client.lua

Sep 17th, 2012
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. if select("#", ...) == 0 then
  2. io.stderr:write "usage: lua client.lua <time client 1>,<time client 2>, ..."
  3. end
  4. local arg = {...}
  5. print(arg)
  6.  
  7. for i=1, select('#', ...) do
  8. local arg = select(i,...)
  9. print("arg: " .. arg)
  10. end
  11.  
  12. for k,v in ipairs(arg) do
  13. print(k,v)
  14. end
  15.  
  16. function fwrite(fmt, ...)
  17. return io.write(string.format(fmt, ...))
  18. end
  19.  
  20. print("type of ...: " .. type(...))
  21.  
  22. fwrite("%s,\t %s,\t %s,\t %s", ... )
  23. print("\n")
Advertisement
Add Comment
Please, Sign In to add comment