0

I try to run

BigDecimal LOADPROCESSID = BigDecimal(461).Add(new BigDecimal(1)) 

at Jython.

However, I got error message

BigDecimal LOADPROCESSID = BigDecimal(461).Add(new BigDecimal(1)) 
          ^ SyntaxError: mismatched input 'LOADPROCESSID' expecting NEWLINE

I searched internet and find this code. However, I am not quite familiar with Jython. So I am not sure whether the code is correct for Jython. If not, how can I write this logic in Jython. Thanks.

1 Answers1

0

In Jython you don't have to user 'new' to instanciate an object, neither you have to declare the type, so simply do

import java.math.BigDecimal as bd
LOADPROCESSID = bd(461).add(bd(1)) 

When you will be more confortable whith Jython, you will be able to overload the 'add' operator.

Regards

Salvatore
  • 61
  • 4