lua-users home
lua-l archive

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


On Mon, Aug 16, 2010 at 1:11 PM, Martin Guy <martinwguy@gmail.com> wrote:
> On 8/16/10, Jonathan Castello <twisolar@gmail.com> wrote:
>>  In which case, I'm confused. Which language actually makes "" a false value?
>
> Unix shell scripts (or, to be pedantic, the "test" program, a.k.a
> "["), where a single string is true if it contains anything. e.g.
>
> if [ "" ]; then
>  echo t
> else
>  echo f
> fi
>
> will say "f".  But I can't recommend compiling shell scripts into Lua... :)
>
>    M

Shell and Perl I suppose I can understand. I've never used either, though.

I guess the moral of the story is: "every language is weird in its own
way", and "get your facts checked before you start posting to a
mailing list"...

~Jonathan