lua-users home
lua-l archive

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


It was thus said that the Great Roberto Ierusalimschy once stated:
> >   One further test.  This time, going by what Lua 5.1.4 *does* and not by
> > what the documentation *says*.  
> > 
> > [...]
> > 
> >   Hmmm ... Roberto, can we expect this behavior, or is this a detail of the
> > implementaion?
> 
> Did you not answer your question in that previous sentence?

  Well, there's a difference between what an implementation *does* and what
the *specification* states.  Just because some C compilers generated the
"expected" output from:

	i = 0;
	printf("%d %d %d\n",i++,i++,i++);

  does not mean that's the intent of the C standard (and for the record,
I've seen comformant C compilers produce different output---even the same
compiler with different optimization options would produce different
output).

  I tried my program with LuaJIT (2.0.0-beta2, old, but I haven't played
around with it since I don't really need it, and I can't use it at work
because we use the Sparc architecture), it being the only other Lua
implementation I have availble, and it too, produced the same output as Lua
5.1.4.

  So, no, I'm still not sure of the answer at this point.

  -spc