lua-users home
lua-l archive

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


On Thu, May 30, 2013 at 7:31 AM, Jose Torre-Bueno <jtorrebueno@cox.net> wrote:
> dofile'testr'
Is there a shell?   true
ls: NOSUCHFILE: No such file or directory
Check for a non existent file gives: nil exit 1

>
> os.execute'testr'
Is there a shell?   1
ls: NOSUCHFILE: No such file or directory
Check for a non existent file gives: 256
>

This is exactly the difference between os.execute running on Lua 5.2 (returns 'nil exit 1') and Lua 5.1 (returns '256')

Check your versions (_VERSION) and you will see...