[comp.lang.pascal] Turbo Pascal units updated at chyde.uwasa.fi

ts@uwasa.fi (Timo Salmi LASK) (06/14/90)

Thu 14-Jun-90  : I have updated my Turbo Pascal (4.0, 5.0, 5.5)
units collection to be version (/pc/ts/)tspas19.arc. The function
indrivfn in tsuntg.tpu tests whether a device is present in a drive.
If you defined an invalid drive (such as '1'), a run time error
occurred in my earlier versions. - Tsunta.tpu has a new function
hightfn, which gives the height of the screen by resolution (25, 43
or 50). - Tsuntf.tpu has a third enhanced readln with line editing,
recall, insert toggle, and clean break potential. - Tsunth.tpu
includes a new function isdirfn to test whether a name is a
directory. - Copyfile procedure copies a file from within a Turbo
Pascal program and returns a success status code. I have seen
postings in the (InterNet) news about problems with copying files in
Turbo Pascal, but I hope that this one should do the trick. -
Openedfn function indicates whether a text file has already been
closed within the program, or if it is still open. This is
particularly convenient for procedures aborting your program. -
Tsuntd includes a new procedure called audio. It is an enhanced
version of Turbo Pascal's own sound procedure. It takes frequency
and duration as parameters, and it does not need the presence of the
interfering Crt unit. Audio was written in collaboration with Ari
Hovila. - And since I am often asked the question, sorry, no, dear
fellow users, the sources are not available, only the units and
their documented interfaces.

As usual, the package is available by anonymous ftp from
chyde.uwasa.fi, Vaasa, Finland.

Summary of the Functions and procedures in the TSPAS Package
Functions are indicated by the ending FN, the procedures by the lack of it.
TSUNTA:
  ATTRIBFN Color attribute for direct write to video memory
  HIGHTFN  Current height of text screen
  PANML    Scroll screen left
  PANMR    Scroll screen right
  VDAEXYFN Direct read of a screen video memory color attribute
  VDCHXY   Direct read from the screen video memory
  VIDXY    Direct write to the screen video memory
  WIDTHFN  Current width of text screen
TSUNTB:
  BINDECFN Convert binary to decimal, fast
  BINFN    Convert decimal to binary, very fast
  BITONFN  Status of a bit in a word
  CONVBFN  Convert from a number of any base to any other base
  DECBINFN Convert decimal to binary, fast (outdated by BINFN)
  DECHEXFN Convert decimal to hexadecimal, fast (outdated by HEXFN)
  HEXDECFN Convert hexadecimal to decimal, fast
  HEXFN    Convert decimal to hexadecimal, very fast
  LBINFN   Convert longint to binary, fast
  LHEXFN   Convert longint to hexadecimal, fast
  POWERFN  Conventional raising of a positive number to a power
  POWERGFN Generalized raising of any real to a power
  POWERLFN Raise longint to a non-negative integer power
  R16TOFN  Sixteen to a power, fast
  TIMERFN  Time elapsed since midnight
  TWOTOFN  Two to a power, fast
TSUNTC:
  DSKCNTFN Get the number of disk devices (MsDos 3+ only)
  PLAYNOTE Play a note
  PRTONLFN Get the online status of a printer
  REVCOLOR Reverse text colors (a toggle)
TSUNTD:
  AUDIO    Enhanced Sound procedure, and no Crt unit needed
  DOSDELAY Delay without using the Crt unit
  LEADFN   Lead a string with a multiple character (i.e. pad left)
  PARSE    Extract all substrings from a string
  SPARTFN  Returns a specified substring (resembles ParamStr)
  STRCNTFN Number of substrings in a string (resembles ParamCount)
  TRAILFN  Trail a string with a multiple character (i.e. pad right)
  TRIMLFFN Trim a string left
  TRIMRGFN Trim a string right
TSUNTE:
  ALLSIZFN Allocated true size of a file in bytes
  BORDER   Change border color (CGA, VGA)
  CAPSONFN CapsLock status
  CLB      Clear the keyboard buffer
  CLUSIZFN Cluster size on a device (cluster is the allocation unit)
  CMDLNFN  Returns the entire command line
  CURSOFF  Turn off cursor (keeps other cursor attributes)
  CURSON   Turn cursor back on as it was
  CURSOR   Change cursor size
  FEXISTFN File existence status, handles ReadOnly files correctly
  FSIZEFN  File size in bytes as in directory
  MONOFN   Is it a monochrome
  NUMLONFN NumLock status
  WEEKNRFN Returns the week number for a given date
  WKDAYFN  Returns modern weekday
TSUNTF:
  EDRDLN   Readln with line-editing potential
  EDREADLN Readln with line-editing, recall, and insert toggle
  EDREADLN Readln with line-editing, recall, insert toggle, and
            break editing
TSUNTG:
  DRIVESFN Number of diskette drives on the system
  FDRIVEFN The name of the first diskette drive on the system
  GOATXY   As the ordinary GoToXY but no Crt unit required
  INDRIVFN Is a media present in the given drive
  INKEYFN  Basic-like timed character input
  KEYPREFN As the ordinary KeyPressed but no Crt unit required
  READKEFN As the ordinary ReadKey but no Crt unit required
  REVAREA  Reverse the colors of an area
  USECON   Restore write and writeln direction to the screen
  USEPRN   Redirect write and writeln to the printer
  WHEREXFN As the ordinary WhereX but no Crt unit required
  WHEREYFN As the ordinary WhereY but no Crt unit required
TSUNTH:
  COPYFILE Copy a file from within a Turbo Pascal program
  GRTABLFN Has MsDos GRAFTABL been loaded or not
  ISDIRFN  Is a name a directory or not
  OPENEDFN Is an assigned textfile still open or not

...................................................................
Prof. Timo Salmi        (Moderating at anon. ftp site 128.214.12.3)
School of Business Studies, University of Vaasa, SF-65101, Finland
Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun