lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Basti,

for k , v in pairs(table) do
  print(tostring(k).."  "..tostring(v))
  end

The above helps me to figure out what is inside a table?

for k , v in pairs(_G) do
  print(tostring(k).."  "..tostring(v))
  end

The above too  helps me a lot.
However, I have a question, what is _G? And, why is it empty when I try it on the shell?

Regards, \Emeka
On Mon, May 7, 2012 at 4:24 AM, Hallison Batista <hallison.batista@gmail.com> wrote:
Alexander, Craig

Really? table.foreach is deprecated? Just learned this statement! So,
just substitute for:

for k, v in pairs(t) do print(k, v) end

Thanks to all.

On Sun, May 6, 2012 at 11:01 AM, Alexander Gladysh <agladysh@gmail.com> wrote:
>
>
> 05.05.2012, в 0:22, Hallison Batista <hallison.batista@gmail.com> написал(а):
>
>> table.foreach(t, print)
>>
>
> table.foreach is deprecated.
>
> Alexander.
>
>



--
Hallison Batista
hallison.batista@gmail.com




--
Satajanus  Nig. Ltd