Bug 44236 - [macros] Overflow with simple Val(Mid(...)) operation
Summary: [macros] Overflow with simple Val(Mid(...)) operation
Status: CLOSED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
3.5.0 Beta2
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-28 11:22 UTC by Gustavo Pacheco
Modified: 2011-12-28 12:08 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gustavo Pacheco 2011-12-28 11:22:42 UTC
This piece of code works fine in 3.4.x ('MsgBox Result' prints 123), but results Overflow in 3.5.0 Beta2 :

Sub Main
  Dim Result As Integer
  Dim strText as string
  Dim Position As Integer
  
 strText = "000000000000000123011"
 Position = 16
 Result = Val(Mid(strText,Position,3))
 MsgBox Result
End Sub

Thanks!
Gustavo Pacheco.
Comment 1 Cor Nouws 2011-12-28 11:39:55 UTC
confirm on Ubuntu in 350 beta1 (beta2 busy with other task ;-) )
Comment 2 Gustavo Pacheco 2011-12-28 12:08:03 UTC
 Val returns Double then, Result should be Double. Closed.