Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Turbo Pascal - <b> ofs get offset of variable pp 204</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 OFS                        Get Offset of Variable                    pp 204

 Syntax:  Ofs (VarName) ;

 Type:    Integer

 Form:    Function

 Purpose: Returns the offset of VarName in its memory segment.


 ----------------------------------------------------------------------------


 Usage:
       VAR
          IntVar  : Integer         ;
          Offset  : Integer         ;
          VarName : Integer         ;
          Pointer :^Integer         ;

       BEGIN
          IntVar  := Ofs (VarName)  ;  { Get segment offset of VarName }
          Offset  := Ofs (Pointer)  ;  { Get segment offset of Pointer }
       END.

See Also: Absolute Addr Pointer Ptr Seg

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson