Eliot’s Tips and Tricks

Multiple function returns

Returning multiple values from a function is something that you really learn to enjoy! It makes sense really, functions can take multiple inputs, why not multiple outputs?

Here’s the syntax:

local A,B = Foo('blah')

function Foo(Msg)
   return 1, "Two"
end
Tagged:

One Comment

  1. Pingback: Will You Share Your Code? - iNTERFACEWARE Inc.

Leave A Comment?