Problem running a progranm in version 6 !?

HARRY

Active Member
Licensed User
Longtime 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
 

HARRY

Active Member
Licensed User
Longtime 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
 

alfcen

Well-Known Member
Licensed User
Longtime 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
 
Top