Problem running a progranm in version 6 !?

Discussion in 'Questions (Windows Mobile)' started by HARRY, Jan 17, 2008.

  1. HARRY

    HARRY Active Member Licensed User

    Erel,

    An 'old' program does not run correctly with the libraries of version 6. At least, I think that that is the reason.

    It runs correctly in debug mode , both on the device and on the desk top.

    However, translated it does not run correctly on the device, nor on the desktop. It doesn't stop, but just doesn't do what it should do. As in debug mode it works fine, it is difficult for me to analyze the problem.

    It doen't work correctly in an area where quite some decimal arithmetic is done.

    Any idea?

    Harry
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Can you upload a small portion of the code that demonstrates the problem?
    If not, then please send it to me: erel@basic4ppc.com
     
  3. HARRY

    HARRY Active Member Licensed User

    Erel,

    I found the problem myself already:

    err is an boolean

    leaving a sub the statement : "return not (err)" works in debugging mode, but after compilation the inversion does not take place. With the previous version it did work, also in run mode.

    The new code works in both modes:

    If err = true Then
    err=false
    Else
    err=true
    End If
    Return err

    I do not know who is right: the compiler or the debugger?

    Shouldn't they react in the same way?

    Harry
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    They should react the same.
    I can't reproduce this problem. It seems to work properly.
     
  5. alfcen

    alfcen Well-Known Member Licensed User

    Hi Harry
    I encountered similar behaviours with Booleans, too. Just for fun, please try

    If err Then '(not: If err = true)
    err=false
    Else
    err=true
    End If
    Return err
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    @Harry, I've received your project and I see the problem.
    It will be fixed in the next release.
     
Loading...