[ create a new paste ] login | about

Link: http://codepad.org/LcTxhbi2    [ raw code | output | fork ]

Lua, pasted on Mar 16:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
args = {}
args['alt1'] = 'foo'
args['alt2'] = 'bar'
args['alt3'] = 'baz'
args['alt4'] = 'qux'
args['alt5'] = 'quux'

for i = 1, 9 do
  altX = args['alt'..i]
  if altX == nil then
    break
  end
  if altX == 'qux' then
    print(altX)
    break
  end
end


Output:
1
qux


Create a new paste based on this one


Comments: