Max javascript string conversion?

Anthony Palomba's icon

In normal java script I can take a string and do the following...

foo = "123";
bar = Integer.parseInt(foo);

bar then holds the interger conversion of the
string. When I make this call in Max, Max does
not understand the function parseInt. Is there
an equivalent set of functions I can use in MAX?

Anthony

Emmanuel Jourdan's icon

This works for me:

foo = "123";
bar = parseInt(foo);

Integer.parseInt() is the Java method, isn't it?

HTH,
ej