This language bar is your friend. Select your favorite languages!
Edit summary for version 34 :
[Lua] Use x instead of -2

Version 33

Version 34

Idiom #59 Write to standard error stream

Print the message "x is negative" to standard error (stderr), with integer x value substitution (e.g. "-2 is negative").

Idiom #59 Write to standard error stream

Print the message "x is negative" to standard error (stderr), with integer x value substitution (e.g. "-2 is negative").

Code
io.stderr:write(string.format("%d is negative\n",-2))
Code
io.stderr:write(string.format("%d is negative\n",x))