Hi Chris,
I have opened a new thread in the forums to answer to your website article.
And here is my opinion: please don't loose time to emulate this strange behavior!
Maybe invest the time to analys current code either through the XPorter/VO or with a separate tool to find problematic places in VO code.
Wolfgang
P.S. I'm currently helping an Italian customer to migrate his large VO 2.5 application to 2.8, and I'm really wondering how many things that make no sense were allowed by VO or sometimes are threated in a completely illogic manner
VO Compatible Arithmetic in X#
VO Compatible Arithmetic in X#
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
VO Compatible Arithmetic in X#
Wolfgang,
i'd second to "drop" this - although, i'm probably not qualified to talk, as a quick search all in my projects shows only a handful of "BYTES"
Chris, what about the bigger types? "WORD" i find quite more... most are holding return vals from windows dialogs, so should be unproblematic.
Maybe it might make sense to build a tool to list "operations" on this types...
i'd second to "drop" this - although, i'm probably not qualified to talk, as a quick search all in my projects shows only a handful of "BYTES"
Chris, what about the bigger types? "WORD" i find quite more... most are holding return vals from windows dialogs, so should be unproblematic.
Maybe it might make sense to build a tool to list "operations" on this types...
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
VO Compatible Arithmetic in X#
Hi,
I am happy that you find this. In some old codes a I wondered about some strange arithmetic behaviours.
I had to refactor code like this:
to this:
to have correct results.
My opinion: keep the dotnet standard.
Stefan
I am happy that you find this. In some old codes a I wondered about some strange arithmetic behaviours.
I had to refactor code like this:
Code: Select all
n := BYTE(250) + BYTE(10) + BYTE(1)
Code: Select all
n := BYTE(250) + BYTE(10)
n := n + BYTE(1)
My opinion: keep the dotnet standard.
Stefan
VO Compatible Arithmetic in X#
Guys,
This has to do with all 3 types BYTE, WORD and SHORT. Everywhere you are using them in calculations, in some cases results (intermediate or final ones) might be overflowing to 8 bits or 16 bits and in other cases they may not. If you are using them just to store values, without doing calculations with them (or your calculations use small enough numbers so that they never overflow), then there is no potential problem.
This has to do with all 3 types BYTE, WORD and SHORT. Everywhere you are using them in calculations, in some cases results (intermediate or final ones) might be overflowing to 8 bits or 16 bits and in other cases they may not. If you are using them just to store values, without doing calculations with them (or your calculations use small enough numbers so that they never overflow), then there is no potential problem.
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
VO Compatible Arithmetic in X#
Hi Chris
There are some things (sets of incompatibilities) that will simply defy all means of resolution within compiler logic.
If this is the case here, I'd suggest separate packages which effectively poke their noses back into the source code and amend as required.
They'd only be used once by those who need them to get everything "XSharped", or have I got the wrong end of the stick?
Terry
There are some things (sets of incompatibilities) that will simply defy all means of resolution within compiler logic.
If this is the case here, I'd suggest separate packages which effectively poke their noses back into the source code and amend as required.
They'd only be used once by those who need them to get everything "XSharped", or have I got the wrong end of the stick?
Terry