[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Indices starting from non-1 (Was: Killa: a scripting language ...)
- From: Dirk Laurie <dirk.laurie@...>
- Date: Thu, 28 Feb 2013 07:06:55 +0200
>> A real lua programmer would not mind indices starting from PI
They're allowed but not useful just yet:
x={}
pi=math.pi
for k=pi,20 do x[k]=k end
print('{'..table.concat(x)..'}') --> {}
print('{'..table.concat(x,',',pi,pi+5)..'}') --> ERROR
You qualify as a Grade 1 Lua Fundi if you can guess
what that error message says before trying it out, and
as Grade 2 if, after seeing it, you can explain why it says
that .