1. *** New version of B4J is available ***
    B4J v7.8
    Dismiss Notice

B4J Question Bug or problem??

Discussion in 'B4J Questions' started by Robert Valentino, Aug 2, 2019.

  1. Robert Valentino

    Robert Valentino Well-Known Member Licensed User

    I am using B4j 7.32 and read the following values in from a sqllite database

    Hard coded here for example

    Code:
    Dim test1    As Long = -63453915550580737
    Dim test2   As Long = -63453915550580737
          
    Log("test:" &(test1 = test2))
    These numbers much as they are the same always fail the comparison test

    Even when I try a LongAnd against them they fail to match

    Code:
    #Region LandANDTest / LongAND 
    Public  Sub LongANDTest(N1 As Long, N2 As Long)  As Boolean

           
    If LongAND(N1, N2) <> 0 Then Return True
           
           
    Return False
    End Sub

    Public  Sub LongAND(N1 As Long, N2 As Long) As Long
               
    Dim jo As JavaObject = CreateJO
         
               
    Return jo.RunMethod("andLong"Array(N1, N2))
    End Sub

    #If JAVA
    public long andLong(long n1, long n2)           { return n1 & n2;     }
    public long orLong(long n1, long n2)            { return n1 | n2;     }
    #End If
    I am sure this is sometime simple that I am missing

    BobVal
     
  2. Robert Valentino

    Robert Valentino Well-Known Member Licensed User

    Upgraded to 7.51 and still same thing.
     
  3. inakigarm

    inakigarm Well-Known Member Licensed User

  4. Robert Valentino

    Robert Valentino Well-Known Member Licensed User

    inakigarm - thanks for the link to the post.

    That is exactly the problem I am having.
    Normally I use B4J for quick and dirty stuff and always run in Debug mode.
    Code works perfect in Release mode - so it is just a Debug mode problem (fails every time)

    I guess I will have to make sure I run in release mode.
     
  5. emexes

    emexes Well-Known Member Licensed User

    Still works here, even in debug mode.

    Does it fail for you in debug mode even after doing the Project Clean?
     
  6. Robert Valentino

    Robert Valentino Well-Known Member Licensed User

    Yes, but always works in release
     
  7. Erel

    Erel Administrator Staff Member Licensed User

    Clean the project and make sure that there are no breakpoints in this sub.
     
    Robert Valentino likes this.
  8. Robert Valentino

    Robert Valentino Well-Known Member Licensed User

    Had done the Clean project (BUT did have breakpoints) removed the breakpoints and all works fine in Debug Mode.

    Going to have to remember this.... What was I suppose to remember?
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice