PermaLink Is this a compiler bug in Lotus Notes 6?05/28/2004 06:56 PM

I came along a very strange problem with the Lotus Notes 6 compiler today. Just to save time I tried to use 1024 * 1024 instead of 1048576. The Lotus Notes Designer Client refused to save this with error "overflow". When using a variable containing 1024 instead of using the number itself there seems to be no problem. Weird!

Sub Click(Source As Button)
        Dim number As Double
        Dim a As Double
        a = 1024
' just to proof that Long is big enough
        number = 1048576
'next line will work fine
        number = a * 1024
' this would not work, why??
' number = 1024 * 1024        
        Print number
End Sub



Technorati:

This page has been accessed 146 times. .
Comments:v

1. Christian Brandlehner06/04/2004 15:34:46
Homepage: http://chris.brandlehner.at


This problem has been assigned SPR # PCOY5ZJBNH by IBM Lotus Support.
The same problem occurs also for additions:

A lower limit is also reached with addition

Sub Click(Source As Button)
Dim number As Double
number = 32768
msgbox number
End Sub

However try set the same value using multiplication, you will get a compile error 'Overflow..'

Sub Click(Source As Button)
Dim number As Double
number = 30000 + 2768 ' (Which will equal 32768)
msgbox number
End Sub




2. Christian Brandlehner08/12/2004 21:43:12
Homepage: http://chris.brandlehner.at


IBM Lotus Support confirmed that this is a bug although there are no plans to fix this problem in the 6.x codestream.




Disclaimer
The weblog represent my personal views and comments and does not represent the views of my current or previous employers or customers.
About me
By Category
The BlogRoll
XING advertisement
Proudly Employed By
IBM Lotus Logo
Buy this book
Search
Monthly Archive
2010
2010
2010
2010
2009
2009
2009
2009
2009
2009
2009
2009
2008
2008
2008
2008
2008
2008
2008
2007
2007
2007
2007
2007
2007
2007
2007
2007
2007
2006
2006
2006
2006
2006
2006
2006
2006
2006
2006
2006
2006
2005
2005
2005
2005
2005
2005
2005
2005
2005
2005
2005
2004
2004
2004
2004
2004
2004
2004
2004
2004
2004
2004
2004
2003
2003
Full Archive
Todays Referrers
Advertisement