next up previous contents index
Next: GetGid Up: Functions and procedures Previous: GetEpochTime

GetFS

   

Declaration:

Function GetFS (Var F : Any File Type) : Longint;

Description:

GetFS returns the file selector that the kernel provided for your file. In principle you don' need this file selector. Only for some calls it is needed, such as the Select call or so.

Errors:

In case the file was not opened, then -1 is returned.

See also:

Select

Example
Program Example33;

{ Program to demonstrate the SelectText function. }

Uses linux;

Var tv : TimeVal;
    
begin
  Writeln ('Press the <ENTER> to continue the program.');
  { Wait until File descriptor 0 (=Input) changes }
  SelectText (Input,nil);
  { Get rid of <ENTER> in buffer }
  readln;
  Writeln ('Press <ENTER> key in less than 2 seconds...');
  tv.sec:=2;
  tv.usec:=0;
  if SelectText (Input,@tv)>0 then 
    Writeln ('Thank you !')
  else
    Writeln ('Too late !');
end.



Michael Van Canneyt
Thu Sep 10 13:59:33 CEST 1998