Hallo fredvs,

Du schriebst am Fri, 11 Jun 2021 14:34:36 -0700 (MST):

> When compiling msegui applications, there are lot of hints of this
> kind:
> 
> > mseclasses.pas(3714,12) Hint: (4055) Conversion between ordinals and
> > pointers is not portable
> 
> Line 3714 of mseclasses.pas (column 12 is "ptruint") is:
> 
> > if odd(ptruint(source)) then begin
> 
> What does it mean and how to fix that and what could be the problems?

This simply means that the sies of pointer and dword (ptruint) might
differ on some systems (notably 64bit ones).
In other cases, it could also mean that one or both ofthe types might
vary in size or range dependent on the system used, and that this might
lead to a possible disparity between the sets of possible values, i.e.
that there might be values one of the tpes can assume, that the other
cannot. Trying to convert such values _SHOULD_ in any case lead to an
error - if recognizable on compiling, a compiler error, if only
recognizable at runtime, at least an exception (range check or so) and
possibly a program abort (and an appropriate message).

BTW, a resolution for the case mentioned above would be an appropriate
definition of the "ptruint" type. This might be tricky if conditional
compilation will not work, because the compiler doesn't take into
account what condition is in effect when it recognizes such a case.
You might end up having to conditionalize any and all such cases
individuall at the very place where they occur...

-- 
(Weitergabe von Adressdaten, Telefonnummern u.ä. ohne Zustimmung
nicht gestattet, ebenso Zusendung von Werbung oder ähnlichem)
-----------------------------------------------------------
Mit freundlichen Grüßen, S. Schicktanz
-----------------------------------------------------------



_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to