[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lua-l
Subject:    Re: Module DLL with Lua 5.4.2
From:       Ranier Vilela <ranier.vf () gmail ! com>
Date:       2020-10-27 18:02:50
Message-ID: CAEudQAr9U_8am5RtsmMEAEH7f7guykJ8_WMgf3D=i-4v07BEEg () mail ! gmail ! com
[Download RAW message or body]

Em ter., 27 de out. de 2020 =C3=A0s 14:26, Ranier Vilela <ranier.vf@gmail.c=
om>
escreveu:

>
> Em ter., 27 de out. de 2020 =C3=A0s 10:29, Sergey Kovalev <kovserg33@gmai=
l.com>
> escreveu:
>
>> Try to write: attest.lua
>> function dump(x) for k,v in pairs(x) do print(k,v) end end
>> dump(_G);
>>
> Thanks for the hint.
>
> Added the line require "libtest", I don't know if it made a difference.
> The dump suggested, show my module functions:
> testfuncs  table: 000001A9740D72A0
> like
> io      table: 000001A9740D1780
>
> Why Lua 5.4, do not find it in "testfuncs table"?
>
Solved. In Lua program, with functions stored in table, need the namespace:
table.function

Thank you Sergey Kovalev.

Ranier Vilela

[Attachment #3 (text/html)]

<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em ter., 27 \
de out. de 2020 Ã s 14:26, Ranier Vilela &lt;<a \
href="mailto:ranier.vf@gmail.com">ranier.vf@gmail.com</a>&gt; \
escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div \
dir="ltr"><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em ter., 27 \
de out. de 2020 Ã s 10:29, Sergey Kovalev &lt;<a href="mailto:kovserg33@gmail.com" \
target="_blank">kovserg33@gmail.com</a>&gt; escreveu:<br></div><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex">Try to write: attest.lua<br> function dump(x) for \
k,v in pairs(x) do print(k,v) end end<br> dump(_G);<br></blockquote><div>Thanks for \
the hint.</div><div><br></div><div>Added the line require &quot;libtest&quot;, I \
don&#39;t know if it made a difference.</div><div>The dump suggested, show my module \
functions:</div><div>testfuncs   table: \
000001A9740D72A0</div><div>like<br></div><div>io         table: \
000001A9740D1780</div><div><br></div><div>Why Lua 5.4, do not find it in  \
&quot;testfuncs table&quot;?</div></div></div></blockquote><div>Solved. In Lua \
program, with functions stored in table, need the \
namespace:</div><div>table.function<br></div><div><br></div><div>Thank you Sergey \
Kovalev.<br></div><div><br></div><div>Ranier Vilela<br></div></div></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic