Difference between revisions of "Far"

From Lazarus wiki
Jump to navigationJump to search
(English translation of German page)
 
 
(2 intermediate revisions by the same user not shown)
Line 13: Line 13:
  
  
Example:
+
Examples:
  
 
<syntaxhighlight lang=pascal>
 
<syntaxhighlight lang=pascal>
   ...
+
//procedures
   procedure subTest; far;
+
procedure subTest; far;
   ...
+
begin
 +
end;
 +
 
 +
function fHandler: boolean; far;
 +
begin
 +
   fHandler:= true;
 +
end;
 +
 
 +
//types
 +
type
 +
   PFarChar = ^char; far;
 +
 
 +
//vars
 +
var
 +
   prcf: Procedure; far;
 
</syntaxhighlight>
 
</syntaxhighlight>

Latest revision as of 00:15, 22 October 2022

Deutsch (de) English (en)


Back to Reserved words.


The reserved word far:

  • belongs to 16 bit programming (DOS, Windows 3.x);
  • allows subroutines to be started in memory areas beyond the 64KB limit;
  • allows DLLs to be jumped to in memory areas beyond the 64KB limit;
  • became obsolete with 32-bit programming.


Examples:

//procedures
procedure subTest; far;
begin
end;

function fHandler: boolean; far;
begin
  fHandler:= true;
end;

//types
type
  PFarChar = ^char; far;

//vars
var
  prcf: Procedure; far;