Javascript conversion

I am trying to understand why the following Basic code (for example) is not converted correctly:

Dim x
Dim MASS_ONOFF
x = MASS_ONOFF

becomes

var x;
var MASS_ONOFF;
x = MASS.ONOFF;

and

Dim x, y
y= “abc_def”
x = Replace(y, “_”, “”)

becomes

var x,y;
y= “abc_def”;
x = Replace(y, “” , “_”);

It’s the underscores. It has to do this for expressions like Button1_onclick, which get (correctly) translated to Button1.onclick().

You’ll need to call MAS_ONOFF something else.

Hi,
I understand the problem for variable names, and it should be easy enough to use different names, although not being able to use underscores in variable names is a bit restrictive. But in a text string? Those should not really be touched by the translation process.
Thomas

You can use underscores in variable names, generally, but not anything that contains _ON or _on. It also applies to function names. There may be other restrictions that I have not come across.