NumberFormatException with too long numbers using eval() BeanShell method

I've a problem using Interpreter BeanShell class.

When the interpreter tries to evaluate a formula (ie: ((3000000000 + 18)*10), as some of the numbers are bigger than an "int" value the method returns a NumberFormatException.

So I don't really know how to evaluate this kind of situation.

Any suggestion?.

Thanks a million for your help.

RNM.

[381 byte] By [IRISa] at [2007-11-26 13:16:52]
# 1
Add an L at then end to signify that the number is to be treated as a long.(3000000000L + 18)*10)
2chumpya at 2007-7-7 17:39:52 > top of Java-index,Java Essentials,Java Programming...
# 2
I'm going to try right now.I'll let you know the result.Thank you very much for your help.RNM.
IRISa at 2007-7-7 17:39:52 > top of Java-index,Java Essentials,Java Programming...
# 3
It works!!!Thanks a million.
IRISa at 2007-7-7 17:39:52 > top of Java-index,Java Essentials,Java Programming...