home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / SORT2.ZIP / ISATTY.FUN < prev    next >
Encoding:
Text File  |  1993-01-04  |  329 b   |  11 lines

  1. { Call with 0 or 1 to see if standard input or output has been directed from
  2.   or to a file. }
  3.  
  4. function isatty(handle:word):boolean; var r: dos.registers; begin
  5.    with r do begin
  6.    ax:=$4400; bx:=handle; dos.msdos(r);
  7.    if (flags and fcarry)=0 then
  8.       isatty:= (ax and $80)<>0
  9.    else isatty:=false; end; end;
  10.  
  11.