ktrinad Posted August 31, 2006 Share Posted August 31, 2006 By: Fco Antonio - jofranco sum of variables 2003-07-11 14:28 Hi: As I make the sum of two variables? By: Giulio Toffoli - gt78 RE: sum of variables 2003-07-11 15:22 new Double( $V{var1}.doubleValue() + $V{var2}.doubleValue() ) I have assumed that your vars was Double... Giulio Link to comment Share on other sites More sharing options...
dpinfo Posted October 22, 2009 Share Posted October 22, 2009 ktrinadWrote: By: Fco Antonio - jofranco sum of variables 2003-07-11 14:28 Hi: As I make the sum of two variables? By: Giulio Toffoli - gt78 RE: sum of variables 2003-07-11 15:22 new Double( $V{var1}.doubleValue() + $V{var2}.doubleValue() ) I have assumed that your vars was Double... Giulio Code:I have to make the sum of a parameter that is integer with a defalut variabile (Pages).I have defined the parameter as integer and according on the example upstair I did :new Integer($P{PAGIN}.intValue()+$V{PAGE_NUMBER}.intValue())he said me "Can not cast from int to Integer" the default value of $P{PAGIN} The default value is 100. I tried both with 100 and "100" and I have the same result.Please help me.Bye Link to comment Share on other sites More sharing options...
ckampshoff Posted October 22, 2009 Share Posted October 22, 2009 Hi dpinfo,if you only write 100 this won't work. You have to do it like this: new Integer(100), because 100 is the same as new Integer(100).intValue()HTHChristina. Link to comment Share on other sites More sharing options...
dpinfo Posted October 22, 2009 Share Posted October 22, 2009 /tools/fckeditor/editor/images/smiley/msn/thumbs_up.gif Thank you very much/tools/fckeditor/editor/images/smiley/msn/teeth_smile.gif /tools/fckeditor/editor/images/smiley/msn/teeth_smile.gif Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now