ts@uwasa.fi (Timo Salmi LASK) (11/28/89)
Tue 28-Nov-89: Some time ago there was a lively discussion in the InterNet news group comp.lang.pascal how to redirect all write and writeln statements to the printer without having to change the statements. I now have a solution to that problem for Turbo Pascal 4.0 and 5.0. The procedures USEPRN and USECON are part of update /pc/ts/tspas16.arc of my Turbo Pascal 5.0 and 4.0 units collection. The new procedures/functions also include WEEKNRFN function in the TSUNTE unit. It gives the weeknumber for a given date. REVCOLOR in TSUNTC reverses (toggles) text colors. And there are many other new routines making up a new unit TSUNTG. Available by anonymous ftp as usual. ................................................................... Prof. Timo Salmi (Site 128.214.12.3) School of Business Studies, University of Vaasa, SF-65101, Finland Internet: ts@chyde.uwasa.fi Funet: vakk::salmi Bitnet: salmi@finfun TSPAS16.ARC Turbo Pascal 5.0 units, T.Salmi =========== Functions are indicated by the ending FN, the procedures by the lack of it. TSUNTA: PANMR Scroll screen right PANML Scroll screen left WIDTHFN Current width of text screen ATTRIBFN Color attribute for direct write to video memory VIDXY Direct write to the screen video memory VDCHXY Direct read from the screen video memory VDAEXYFN Direct read of a screen video memory color attribute TSUNTB: TIMERFN Time elapsed since midnight 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 TWOTOFN Two to a power, fast R16TOFN Sixteen to a power, fast BITONFN Status of a bit in a word CONVBFN Convert from a number of any base to any other base BINDECFN Convert binary to decimal, fast DECBINFN Convert decimal to binary, fast (outdated by BINFN) BINFN Convert decimal to binary, very fast LBINFN Convert longint to binary, fast HEXDECFN Convert hexadecimal to decimal, fast DECHEXFN Convert decimal to hexadecimal, fast (outdated by HEXFN) HEXFN Convert decimal to hexadecimal, very fast LHEXFN Convert longint to hexadecimal, fast TSUNTC: PLAYNOTE Play a note PRTONLFN Get the online status of a printer DSKCNTFN Get the number of disk devices (MsDos 3+ only) REVCOLOR Reverse text colors (a toggle) TSUNTD: TRIMRGFN Trim a string right TRIMLFFN Trim a string left LEADFN Lead a string with a multiple character (i.e. pad left) TRAILFN Trail a string with a multiple character (i.e. pad right) DOSDELAY Delay without using the Crt unit PARSE Extract all substrings from a string STRCNTFN Number of substrings in a string (resembles ParamCount) SPARTFN Returns a specified substring (resembles ParamStr) TSUNTE: CURSOFF Turn off cursor (keeps other cursor attributes) CURSON Turn cursor back on as it was CURSOR Change cursor size BORDER Change border color (CGA, VGA) CLB Clear the keyboard buffer MONOFN Is it a monochrome CAPSONFN CapsLock status NUMLONFN NumLock status FEXISTFN File existence status, handles ReadOnly files correctly FSIZEFN File size CMDLNFN Returns the entire command line WKDAYFN Returns modern weekday WEEKNRFN Returns the week number for a given date TSUNTF: EDRDLN Readln with line-editing potential EDREADLN Readln with line-editing, recall, and insert toggle TSUNTG: DRIVESFN Number of diskette drives on the system FDRIVEFN The name of the first diskette drive on the system INDRIVFN Is a media present in the given drive GOATXY As the ordinary GoToXY but no Crt unit required REVAREA Reverse the colors of an area USEPRN Redirect write and writeln to the printer USECON Restore write and writeln direction to the screen