I recompiled a large PBWIN7 project to PBWIN9 and came across something strange,
more stranger then me!
This line is the original code and uses an interger division that now causes an exception
in my program when I execute this line of code...
@ed.wnHeight = MAX&(1, (HIWRD(lParam) - sBarWidth) \ @ed.charHeight + 1)
...when I change to a floating point division, it works perfectly again.
@ed.wnHeight = MAX&(1, (HIWRD(lParam) - sBarWidth) / @ed.charHeight + 1)
...and this also works perfectly.
@ed.wnHeight = MAX&(1, (HIWRD(lParam) - sBarWidth) \ ( @ed.charHeight + 1 ) )
Thx.
Regards,
Stumped and a little bit stupid...
more stranger then me!

This line is the original code and uses an interger division that now causes an exception
in my program when I execute this line of code...
@ed.wnHeight = MAX&(1, (HIWRD(lParam) - sBarWidth) \ @ed.charHeight + 1)
...when I change to a floating point division, it works perfectly again.
@ed.wnHeight = MAX&(1, (HIWRD(lParam) - sBarWidth) / @ed.charHeight + 1)
...and this also works perfectly.
@ed.wnHeight = MAX&(1, (HIWRD(lParam) - sBarWidth) \ ( @ed.charHeight + 1 ) )
Thx.
Regards,
Stumped and a little bit stupid...
Comment