Convert symbols to floats

Jan 22, 2013 at 3:08pm

Convert symbols to floats

I am receiving my data as symbols and then I convert them to floats using maxobjects. However, I woud like to do this conversion already in the mxj object itself. How should I do that?
Thank you!

#66177
Jan 22, 2013 at 4:01pm
#238209
Jan 22, 2013 at 4:27pm

When writing this in my public class I get errors. The compiler wants to see an identifier after the parentheses
< static final float parseFloat(LAST_TRADE) = 52; >

#238210
Jan 23, 2013 at 5:42pm

No, you call it, not declare it:

float foo = Float.parseFloat("12346.789");

#238211

You must be logged in to reply to this topic.