Board index » delphi » counterpart of seg(x) and ofs(x) functions

counterpart of seg(x) and ofs(x) functions

Hi, everyone:

   I used a lot of seg(x) and ofs(x) functions, that are functions of
system unit, in Delphi 1. When I port them in Delphi 5, I get compling
errors. Does anyone
knows what was going on?

 

Re:counterpart of seg(x) and ofs(x) functions


Quote
pigiron <pigi...@ms21.hinet.net> wrote:
>   I used a lot of seg(x) and ofs(x) functions, that are functions of
>system unit, in Delphi 1. When I port them in Delphi 5, I get compling
>errors. Does anyone
>knows what was going on?

seg() and ofs() were for 16-bit environments.  Delphi 2 and
later are 32-bit, so they don't need them.

Jud McCranie

Re:counterpart of seg(x) and ofs(x) functions


Im Artikel <3818508C.AF85C...@ms21.hinet.net>, pigiron <pigi...@ms21.hinet.net>
schreibt:

Quote
>  I used a lot of seg(x) and ofs(x) functions, that are functions of
>system unit, in Delphi 1.

When you deal with pointers, you should know that D/32 only has flat pointers,
no segmented pointers. Perhaps you want to replace the seg(x) functions by the
flat address of your data items, and the ofs(x) by the offset into some data
structure? Otherwise forget about seg(x), and let all ofs(x) be 32 bit
pointers.

DoDi

Other Threads