Posted By

yuconner on 09/19/07


Tagged

hacks


Versions (?)

awful hack to perform early returns in lua


 / Published in: Lua
 

a simple return statement seems no work

  1. do return end
  2.  
  3. -- example:
  4. function foo:test()
  5.  
  6. --some work
  7.  
  8. do return end
  9.  
  10. --something avoided
  11.  
  12. end

Report this snippet  

You need to login to post a comment.