Clue
Clue copied to clipboard
Increment operators like `x++` and `++x`
To increment number in Clue we using
x += 1
But it's ugly(imho), it's rather to use increment operators since it can shorten many lines of code, for example:
// Can replace this by single line: print(tbl[++x])
x += 1
print(tbl[x])
Can implement in Clue like this:
Clue:
print(x++)
print(++x)
Lua:
print(x) -- x++
x = x + 1 -- x++
x = x + 1 -- ++x
print(x) -- ++x