lua-users home
lua-l archive

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



On May 29, 2013, at 11:14 PM, steve donovan <steve.j.donovan@gmail.com> wrote:


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...


Thank you that is exactly the problem.  Adding a printout of _VERSION gives:

> dofile'testr'
Lua 5.2
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'
Lua 5.1
Is there a shell?   1
ls: NOSUCHFILE: No such file or directory
Check for a non existent file gives: 256

I do have both versions installed.  Now I have to figure out what it is about my environment and path that starts 5.2 as the interpreter but 5.1 when I run something.



Jose Torre-Bueno Ph.D.
Empowered Energy Solutions
(858) 292-6100 
(619) 977-0553 (cell)