[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Combine segment and offset to pointer
Source position: systemh.inc line 723
function ptr( |
sel: LongInt; |
off: LongInt |
):farpointer; |
Ptr returns a pointer, pointing to the address specified by segment Sel and offset Off.
Remark: |
|
None.
|
Return address of a variable |
Program Example59; { Program to demonstrate the Ptr (compability) function. } type pString = ^String; Var P : pString; S : String; begin S:='Hello, World !'; P:=pString(Ptr(Seg(S),Longint(Ofs(S)))); {P now points to S !} Writeln (P^); end.
lazarus-ccr.sourceforge.net |