b = string.match(string.format("%.1f",1/5),"([^0-9])")
a = b=="." and "," or "."
very offtopic: I'm confused by this programming logic/syntax
This is what my logic thinking says it is:
a = true and "something" or "somethingElse"
I saw this kind of stuff before, but never understood it.
Is this from Lua specifically and is there any doc/info about this "logic"?
I mean, normally there is something like:
if (a and b) or c then
yeah, the boolean stuff in lua is a bit quirky, but pretty nice. i'm with you that it seems odd because i'm used to such logic operations as being either true of false. in lua, they actually retain their value/type.
"a = 5 or 6" results in a = 5
"a = 5 and 6" results in a = 6