In
this topic you can find an answer:
Roel De Nijs wrote:The general rule is: You can place underscores only between digits. There are of course a few exceptions, like not at the beginning of the end of a number, not adjacent to the decimal point in floating-point literals,...
You can find an explanation for
var1,
var2 and
var3 there.
var4 is illegal because there is an underscore between b and 1.
var5 is illegal because G is illegal digit in hex literal.