[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: What has happened to arg?
- From: Geoff Leyland <geoff_leyland@...>
- Date: Wed, 5 Jun 2013 15:50:24 +1200
On 5/06/2013, at 3:07 PM, Dirk Laurie <firstname.lastname@example.org> wrote:
> It is 05:00 in my timezone. My head probably is not working.
> I can't figure out this:
> …/latest$ src/lua
> Lua 5.2.2 Copyright (C) 1994-2013 Lua.org, PUC-Rio
> It is the very latest Lua 5.2.2, just downloaded from lua.org.
> Surely `arg` should be a table, in which arg="lua" etc.?
arg doesn't seem to be available to the command-line. Page 8 of PiL(2nd ed I'm afraid) says "A *script* can retrieve its arguments...".
Given this test.lua:
$ ./lua test.lua
My 5.2 was compiled with LUA_COMPAT_ALL off.