lua-l archive
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
] [
Date Index
] [
Thread Index
]
Subject
:
Re: Equivalent to __name__ == “_main__”?
From
: Jonathan Goble <jcgoble3@
...
>
Date
: Mon, 6 Dec 2021 14:23:51 -0500
On Mon, Dec 6, 2021 at 2:14 PM Victor Bombi <
sonoro@telefonica.net
> wrote:
if ... then print"this is used by require" end
This fails if there are command-line arguments to the script:
$ lua -v
Lua 5.4.3 Copyright (C) 1994-2021 Lua.org, PUC-Rio
$ cat test.lua
print(...)
$ lua test.lua 1 2 3
1 2 3
Follow-Ups
:
Re: Equivalent to __name__ == “_main__”?
,
Roberto Ierusalimschy
References
:
Equivalent to __name__ == “_main__”?
,
Paul Ducklin
Re: Equivalent to __name__ == “_main__”?
,
Victor Bombi
Prev by Date:
Re: Equivalent to __name__ == “_main__”?
Next by Date:
Re: Equivalent to __name__ == “_main__”?
Previous by thread:
Re: Equivalent to __name__ == “_main__”?
Next by thread:
Re: Equivalent to __name__ == “_main__”?
Index(es):
Date
Thread