home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
dl1b.zip
/
LIB1B.DOC
< prev
Wrap
Text File
|
1987-02-24
|
42KB
|
2,839 lines
Dirk Lesko's Library
Autumn'86 Clipper Version: Expanded Library
Copyright (c) Dirk Lesko 1987
Special Thanks to:
Steven Steiner
Tom Rettig Associates
For their patience in helping me to understand
the Clipper compiler extend system.
And special thanks to my wife
Mariel for her patience in understanding me.
DIRK LESKO'S LIBRARY
--------------------
Ver 1b.
If you find Dirk Lesko's Library to be useful, and
would like to see more Clipper library functions in the
future, A small contribution to the author of these functions
would inspire more functions. The contribution can be any
amount you wish, $10.00 is recommended but feel free to send
whatever you think is justifiable.
Send all contributions and comments to:
Dirk Lesko
C/O Dirk Lesko's Library
P.O. Box 3382
Jersey City, NJ 07303-3382
Dirk Lesko can also be contacted on the BOSS BBS in
New Jersey at the following number: (201)568-7293
Dirk runs an exclusive Clipper conference where you can
converse with the top Clipper experts in the country, as well
as pick up on Nantucket newsletters and bug lists. Your
participation is welcome.
The files included in Dirk Lesko's Library ver. 1b. are:
dl1b.lib - Dirk Lesko's Library version 1b.
dl1b.doc - Documentation for Library version 1b.
checklib.prg - Clipper program to check that all functions
are included in the .LIB file.
To use any of the functions listed here, simply include the
function name as stated in this manual, and add the library
file onto the end of your link command line.
DISCLAIMER OF WARRANTIES
------------------------
Dirk Lesko distributes these functions solely on an "as is"
basis and offers no warranties, period.
Dirk Lesko shall not bear any liability or responsibility to
any user or entity with respect to any liability, loss or
damage caused, or alleged to be caused directly, or indirectly
by the functions contained in this product, including but not
limited to interruption of services, loss of business or
anticipatory profits or consequential damages resulting from
the use or operation of any of the functions contained in this
product.
Dirk Lesko makes no warranties, either expressed or implied
regarding this software product, it's merchantibility and/or
it's fitness for a particular purpose. The user agrees that
Dirk Lesko shall not be held liable for any consequential
damages, even if Dirk Lesko has been advised of the possibility
of such damages.
By using any of the functions contained in this library, you
acknowledge your agreement with all of the above conditions.
LICENSING
---------
You may incorporate any of the functions into software
applications you develop, and you may distribute copies
of the programs to anyone you wish.
Feel free to make copies of the library, and to pass
them along to other users of Clipper. so as to further
perpetuate the dBASE language, and the Clipper compiler.
No source code is provided, and none is available for
release onto the BBS sytems. You may upload and download
copies of Dirk Lesko's Library onto any bulletin board
you like, and you may distribute copies of Dirk Lesko's
Library as long as no fee is charged, and all Copyright
notices are left intact.
TRADEMARK NOTICE
----------------
Clipper is a trademark of Nantucket Corporation
dBASE is a trademark Ashton-Tate
--------------------------------------------------------------
Clipper 1a UNTRIM() FUNCTION
______________________________________________________________
SYNTAX: mem_var = UNTRIM(<expC>,<expN>)
PARAMETERS: <expC> character string
<expN> amount of trailing spaces to add to <expC>
RETURNS: <expC> with spaces added to the end equal to <expN>
PURPOSE: Restore the length of a string after using the
TRIM() function.
NOTES: if <expN> is less than the length of <expC>,
<expC> remains unchanged. (Opposite of trim())
EXAMPLE:
m_var = space(20)
@ 10,0 say "Enter text:" get m_var
read
m_var = trim(m_var)
** program lines using trimmed m_var
m_var = UNTRIM(m_var,20) ** m_var length is restored to 20
** without changing original contents
--------------------------------------------------------------
Clipper 1a DTOW() FUNCTION
______________________________________________________________
SYNTAX: mem_var = DTOW(<expD>)
PARAMETERS: <expD> date variable
RETURNS: Character string in the form Month, day, year
PURPOSE: To print the date in standard letter format
NOTES: none
EXAMPLE:
m_date = DTOW(DATE())
? m_date
** if date = 12/25/87
** DTOW() returns: December 25, 1987
SEE ALSO: LTOW()
--------------------------------------------------------------
Clipper 1a GETKEY() FUNCTION
______________________________________________________________
SYNTAX: m_var = GETKEY()
PARAMETERS: none
RETURNS: uppercase ascii character of key pressed
PURPOSE: to avoid using the UPPER() function 50 times in
every program
NOTES: does not return correct characters for function keys
or ctrl/alt key combinations. Help can be invoked, as
can SET KEY TO.
functionally equivalent to:
set console off
wait "" to mem_var
set console on
mem_var = UPPER(mem_var)
EXAMPLE:
m_var = GETKEY()
--------------------------------------------------------------
Clipper 1a CENTER() FUNCTION
______________________________________________________________
SYNTAX: @ 10,CENTER(mem_var) say mem_var
PARAMETERS: <expC> character string
RETURNS: <expN> integer
PURPOSE: to center text on the screen with @ n,n say command
NOTES: returns (80-LEN(mem_var))/2
EXAMPLE:
m_var = "Main Menu Selections"
@ 1,CENTER(m_var) say m_var
--------------------------------------------------------------
Clipper 1a DIAL() FUNCTION
______________________________________________________________
SYNTAX: DIAL(<expC>,<expC>,<expC>)
PARAMETERS: <expC> Com port designation, com1 or com2
<expC> Dialing command for modem
<expC> Telephone number to dial - can have ( ) - in number
RETURNS: <expC> character string of phone number dialed
PURPOSE: To access a modem and dial a telephone number from
a field in a database
NOTES: You must use the DOS command MODE comX:baud,8,N,1 as stated
in your DOS manual, you can put it in your autoexec.bat file.
You can also include modem commands other than ATDT.
Dial will return a character string equal to the last
parameter sent it. Useful for printing the phone number
and dialing at the same time.
To disconnect the modem, send the command "ATZ" as the
second parameter. examples are using the Hayes standard
To dial long distance, use the modem command "AT DT 1"
as the second parameter.
All examples assume a hayes compatible modem. If the number
being called has the same area code as the telephone, don't
dial the area code, all you will get is a busy signal.
EXAMPLE:
m_com = "com1"
m_stat = "ATDT" **for tone - use "ATDP" for pulse
m_phone = "(212)142-5956"
@ 10,0 say "Dialing :&m_phone"
DIAL(m_com,m_stat,m_phone)
** To disconnect the modem to switch to voice use
@ 10,0 say "Modem disconnected."
DIAL(m_com,"ATZ","")
--------------------------------------------------------------
Asm 1a SET_PAGE() FUNCTION
______________________________________________________________
SYNTAX: SET_PAGE(<expN>)
PARAMETERS: <expN> integer page number
RETURNS: nothing
PURPOSE: to switch the monitor to another page
NOTES: This service does not check for a valid page #
please refer to the DOS technical reference for
proper page #'s.
EXAMPLE:
m_var = 2
SET_PAGE(m_var)
SEE ALSO: GET_PAGE()
--------------------------------------------------------------
Asm 1a RESET() FUNCTION
______________________________________________________________
SYNTAX: RESET(<expN)
PARAMETERS: <expN> parallel printer port number
RETURNS: nothing
PURPOSE: This procedure will reset the printer to it's
power on state.
NOTES: <expN> is optional, if left out, the default
printer port is used.
EXAMPLE:
RESET(1)
&& or &&
RESET()
SEE ALSO: PRTSCR()
--------------------------------------------------------------
Asm 1a PRTSCR() FUNCTION
______________________________________________________________
SYNTAX: PRTSCR()
PARAMETERS: none
RETURNS: nothing
PURPOSE: to print a copy of the screen to the printer
NOTES: none
EXAMPLE:
m_var = " "
@ 10,0 say "Press 'P' to print this screen"
wait "" to m_var
if uppe(m_var)="P"
PRTSCR()
endi
SEE ALSO: RESET()
--------------------------------------------------------------
Asm 1a GET_MODE() FUNCTION
______________________________________________________________
SYNTAX: mem_var = GET_MODE()
PARAMETERS: none
RETURNS: <expN> integer = to current video mode in use
PURPOSE: to get the current video mode
NOTES: Refer to the DOS technical manual for a description
of the various modes.
EXAMPLE:
mem_var = GET_MODE()
? str(mem_var,2)
SEE ALSO: SET_MODE()
--------------------------------------------------------------
Asm 1a GET_PAGE() FUNCTION
______________________________________________________________
SYNTAX: mem_var = GET_PAGE()
PARAMETERS: none
RETURNS: <expN> integer = to the current video page #
PURPOSE: to find out what the current video page is
NOTES: Refer to the DOS technical reference manual
for information on video pages
EXAMPLE:
m_var = GET_PAGE()
? str(m_var,1)
SEE ALSO: SET_PAGE()
--------------------------------------------------------------
Asm 1a CHDIR() FUNCTION
______________________________________________________________
SYNTAX: if .not. CHDIR(<expC>)
PARAMETERS: <expC> character string name of directory to change to
RETURNS: logical .T. if succesful
logical .F. if directory not found
PURPOSE: To change the default directory without running
the DOS CHDIR command.
NOTES: if unsuccessful some reasons could be:
directory does not exist
directory name does not conform to DOS rules
Also, will return false if a CHDIR() is tried
without first trimming the <expC> parameter
because spaces after the root name are not allowed.
EXAMPLE:
m_var = space(20)
@ 10,0 say "Change to what directory? " get m_var
read
if .not. chdir("&m_var")
? "Couldn't find directory &m_var"
else
? "Directory change succesfull:
endif
SEE ALSO: MKDIR(), RMDIR(), CURR_DRIVE(), CURR_DIR(), SET_DRIVE(),
ISDIR()
--------------------------------------------------------------
Asm 1a MKDIR() FUNCTION
______________________________________________________________
SYNTAX: if .not. MKDIR(<expC>)
PARAMETERS: <expC> character string name of directory to make
RETURNS: logical .T. if successful
logical .F. if unable to create directory
PURPOSE: to make a subdirectory without running the
DOS MKDIR command.
NOTES: if unsuccessful, reasons could be:
the name does not conform to DOS standards
no more directory entries are allowed
disk full
directory already exists
EXAMPLE:
m_var = space(20)
@ 10,0 say "Enter directory to make: " get m_var
read
if .not. MKDIR("&m_var")
? "Could not create directory &m_var"
else
? "Directory creation successful"
endif
SEE ALSO: CHDIR(), RMDIR(), CURR_DRIVE(), CURR_DIR(), SET_DRIVE()
ISDIR()
--------------------------------------------------------------
Asm 1a RMDIR() FUNCTION
______________________________________________________________
SYNTAX: if .not. RMDIR(<expC>)
PARAMETERS: <expC> character string of directory to remove
RETURNS: logical .T. if successful
logical .F. if unsuccessful
PURPOSE: to remove a directory without running the DOS RMDIR
command
NOTES: if unsuccessful some reasons could be:
directory does not exist
directory name does not conform to DOS rules
directory is not empty
EXAMPLE:
m_var = space(20)
@ 10,0 say "Remove what directory? " get m_var
read
if .not. RMDIR("&m_var")
? "Could not remove directory &m_var"
else
? "Directory &m_var removed"
endif
SEE ALSO: MKDIR(), CHDIR(), CURR_DRIVE(), CURR_DIR(), SET_DRIVE()
ISDIR()
--------------------------------------------------------------
Asm 1a SET_MODE() FUNCTION
______________________________________________________________
SYNTAX: SET_MODE(<expN>)
PARAMETERS: <expN> integer of mode to change to.
RETURNS: nothing
PURPOSE: to change video modes from Clipper
NOTES: does not check for valid video modes
EXAMPLE:
m_var=2
SET_MODE(m_var)
SEE ALSO: GET_MODE()
--------------------------------------------------------------
Asm 1a SYSMEM() FUNCTION
______________________________________________________________
SYNTAX: mem_var = SYSMEM()
PARAMETERS: none
RETURNS: <expN> integer of DOS's record of TOTAL SYSTEM memory
PURPOSE: to find out how much memory DOS says is installed
NOTES: none
EXAMPLE:
m_var = SYSMEM()
? str(m_var,3)
SEE ALSO: OS()
--------------------------------------------------------------
Asm 1a CURSOR() FUNCTION
______________________________________________________________
SYNTAX: CURSOR(<expN>,<expN>)
PARAMETERS: <expN> integer for starting scan line
<expN> integer for ending scan line
RETURNS: nothing
PURPOSE: to change the size of the cursor from within Clipper
NOTES: the CGA uses 0 - 7 as it's starting/ending scan lines
the EGA/MDA uses 0 - 13 as starting/ending scan lines
if the first <expN> parameter is 32 decimal, the
cursor will be turned off
EXAMPLE:
if iscolor()
CURSOR(0,7)
else
CURSOR(0,13)
endi
SEE ALSO: CSR_TOP(), CSR_BOT()
--------------------------------------------------------------
Asm 1a CLS() FUNCTION
______________________________________________________________
SYNTAX: @ nn,nn say CLS()
PARAMETERS: none
RETURNS: nothing
PURPOSE: functionally equivalent to Clippers @ n,n clear
function, only much faster and cleaner
NOTES: does not clear gets, and can be used to print a string
at location n,n.
EXAMPLE:
@ 5,0 say CLS()
&& or &&
@ 5,0 say CLS() + "This was printed at cursor location 5,0"
--------------------------------------------------------------
Asm 1a CURR_DRIVE() FUNCTION
______________________________________________________________
SYNTAX: mem_var = CURR_DRIVE()
PARAMETERS: none
RETURNS: <expC> uppercase character string of the current
drive letter
PURPOSE: to find out the current default drive
NOTES: none
EXAMPLE:
m_var = CURR_DRIVE()
? "Current default drive is &m_var.:"
SEE ALSO: MKDIR(), CHDIR(), RMDIR(), CURR_DIR(), SET_DRIVE()
ISDIR()
--------------------------------------------------------------
Asm 1a SET_TIME FUNCTION()
______________________________________________________________
SYNTAX: SET_TIME(<expC>)
PARAMETERS: <expC> character string in the form HH:MM:SS
RETURNS: nothing
PURPOSE: to set the computers internal system clock
without running the DOS TIME command.
NOTES: a valid time string is not checked for
unpredictable results can occur if times are
outside those allowable. ie: "25:79:00
also, 24 hour format has to be used
EXAMPLE:
m_var = space(8)
@ 10,0 say "Enter time: " get m_var pict "99:99:99"
read
SET_TIME("&m_var")
SEE ALSO: SET_DATE()
--------------------------------------------------------------
Asm 1a SET_DATE() FUNCTION
______________________________________________________________
SYNTAX: SET_DATE(<expC>)
PARAMETERS: <expC> character string in the form MM/DD/YY
RETURNS: nothing
PURPOSE: to set the computers internal system date
without running the DOS DATE command
NOTES: does not check for valid dates. If an invalid date
is used, unpredictable results could occur.
also, all years are presumed to be for the 20th century.
ie: MM/DD/01 will translate to the year 1901
EXAMPLE:
m_var = space(8)
@ 10,0 say "Enter new date: " get m_var pict "99/99/99"
read
SET_DATE("&m_var")
SEE ALSO: SET_TIME()
--------------------------------------------------------------
Asm 1a SET_DRIVE() FUNCTION
______________________________________________________________
SYNTAX: SET_DRIVE(<expC>)
PARAMETERS: <expC> character letter of drive to set
RETURNS: nothing
PURPOSE: to change the default drive
NOTES: uses the first character of the string passed
as the drive to set, also does not check to
see if the drive actually exists.
EXAMPLE:
m_var = " "
@ 10,0 say "Enter default drive: " get m_var pict "!"
read
SET_DRIVE("&m_var")
SEE ALSO: MKDIR(), CHDIR(), RMDIR(), CURR_DIR(), CURR_DRIVE()
ISDIR()
--------------------------------------------------------------
Clipper 1a SUBSET() FUNCTION
______________________________________________________________
SYNTAX: if SUBSET(<expC>,<expC>)
PARAMETERS: <expC> character string or memory variable
<expC> character string or memory variable
RETURNS: Logical .T. if all characters in first string
appear in the second string regardless of order,
otherwise, returns logical .F.
PURPOSE: to see if all the characters in the first parameter
exist in the second parameter, in any order.
NOTES: Looks for an EXACT match.
EXAMPLE:
m_test = "AaBbCcDdEeFfGgHhIi"
m_var = " "
@ 10,0 say "Enter a string : " get m_var
read
if subset(m_var,m_test)
? "All characters were found....."
else
? "All characters were not found....."
endif
SEE ALSO: SUBSETS()
--------------------------------------------------------------
Asm 1a ISUPPER() FUNCTION
______________________________________________________________
SYNTAX: if ISUPPER(<expC>)
PARAMETERS: <expC> character string or memory variable
RETURNS: Logical .T. if the first character of the string
is uppercase, otherwise, returns .F.
PURPOSE: To see if the first character of a string is uppercase
NOTES: Returns false if any other character besides a valid
alpha character is the first character in the string.
EXAMPLE:
m_var = space(20)
@ 10,0 say "Enter a string : " get m_var
read
if .not. isupper(m_var)
? "The first character is not uppercase"
else
? "The first character is in uppercase"
endif
SEE ALSO: ISLOWER()
--------------------------------------------------------------
Asm 1a ISLOWER() FUNCTION
______________________________________________________________
SYNTAX: if ISLOWER(<expC>)
PARAMETERS: <expC> character string or memory variable
RETURNS: Logical .T. if the first character of the string
is lowercase, otherwise, returns .F.
PURPOSE: To see if the first character of a string is lowercase
NOTES: Returns false if any other character besides a valid
alpha character is the first character in the string.
EXAMPLE:
m_var = space(20)
@ 10,0 say "Enter a string : " get m_var
read
if .not. islower(m_var)
? "The first character is not lowercase"
else
? "The first character is in lowercase"
endif
SEE ALSO: ISUPPER()
--------------------------------------------------------------
Asm 1a LTOW() FUNCTION
______________________________________________________________
SYNTAX: Print LTOW(<expL>
PARAMETERS: <expL> Logical type memory variable
RETURNS: A character string of "True" if <expL> is logical
.T., otherwise returns a string of "False".
PURPOSE: To print the results of a logical variable
NOTES: none
EXAMPLE:
m_var = space(20)
@ 10,0 say "Enter a string : " get m_var
read
Print "The uppercase test was "+LTOW(ISUPPER(m_var))
SEE ALSO: none
--------------------------------------------------------------
Asm 1a OS() FUNCTION
______________________________________________________________
SYNTAX: Print OS()
PARAMETERS: none
RETURNS: character string of the DOS version number
PURPOSE: to find out under which version of DOS we're running
NOTES: only works with 2.XX or higher
EXAMPLE:
@ 10,0 say "You are using DOS version "+OS()
SEE ALSO: SYSMEM()
--------------------------------------------------------------
Clipper SUBSETS() FUNCTION
______________________________________________________________
SYNTAX: m_var = SUBSETS(<expC>,<expC>)
PARAMETERS: <expC> character string or memory variable
<expC> character string or memory variable
RETURNS: A character string of all characters in the first
string that appear in the second string regardless
of order, otherwise, returns a null string
PURPOSE: to see which characters in the first parameter
exist in the second parameter, in any order.
NOTES: Looks for an EXACT match.
EXAMPLE:
m_test = "AaBbCcDdEeFfGgHhIi"
m_var = " "
@ 10,0 say "Enter a string : " get m_var
read
m_var2 = subsets(m_var,m_test)
? "The characters &m_var2 were accepted....."
SEE ALSO: SUBSET()
--------------------------------------------------------------
Asm 1a ALLALPHA() FUNCTION
______________________________________________________________
SYNTAX: if allalpha()
PARAMETERS: <expc> character string or memory variable
RETURNS: logical .T. if all characters in the string are
printable alpha characters, .F. if not.
PURPOSE: to be sure that all characters in the string can
be printed by any printer with standard ascii codes.
NOTES: Alpha characters will be considered as : A-Z, a-z, 0-9
!"#$%&'()*+,-./:;<=>?@[\]^_`}|{~ and space. Also,
returns .F. if no string, or the wrong type variable or
a null string is passed.
EXAMPLE:
mem_var = space(20)
@ 10,0 say "Enter a string:" get mem_var
read
if .not. allalpha(mem_var)
? "&mem_var contains a character that can't be printed"
else
? "All characters can be printed"
endif
SEE ALSO: ALLASCII(), ALLNUM()
--------------------------------------------------------------
Asm 1a ALLASCII() FUNCTION
______________________________________________________________
SYNTAX: if allascii()
PARAMETERS: <expc> character string or memory variable
RETURNS: logical .T. if all characters in the string are
standard ascii characters, .F. if not.
PURPOSE: to be sure that characters in the string do not
contain any extended graphics characters.
NOTES: Ascii characters are those characters with decimal
values between 0 and 127. Also returns .F. if no
string, the wrong type variable is passed, or a null
string is passed. And, if a null character (0) is
encountered, it will be treated as the end of the string.
EXAMPLE:
mem_var = space(20)
@ 10,0 say "Enter a string:" get mem_var
read
if .not. allascii(mem_var)
? "Extended graphics characters are not permitted"
else
? "All characters are within the ascii range"
endif
SEE ALSO: ALLALPHA(), ALLNUM()
--------------------------------------------------------------
Asm 1a ALLNUM() FUNCTION
______________________________________________________________
SYNTAX: if allnum()
PARAMETERS: <expc> character string or memory variable
RETURNS: logical .T. if all characters in the string are
numbers, .F. if not.
PURPOSE: to be sure that the character string contains
only numbers.
NOTES: returns .F. if a null or empty string is passed. Also
returns .F. if no string, or the wrong type variable is
is passed.
EXAMPLE:
mem_var = space(20)
@ 10,0 say "Enter a string of numbers:" get mem_var
read
if .not. allnum(mem_var)
? "You can only enter numbers into the string"
else
? "The character string contains only numbers"
endif
SEE ALSO: ALLALPHA(), ALLASCII()
--------------------------------------------------------------
Asm 1a FRE() FUNCTION
______________________________________________________________
SYNTAX: mem_var = FRE()
PARAMETERS: none
RETURNS: <expN> amount of available memory
PURPOSE: to see if there is enough memory to run a
program before it is run.
NOTES: none
EXAMPLE:
if FRE() < 64000
? "Not enough memory to run program......"
else
RUN <program>
endif
SEE ALSO: SYSMEM()
--------------------------------------------------------------
Asm 1a CURR_DIR() FUNCTION
______________________________________________________________
SYNTAX: mem_var = CURR_DIR(<expC>)
PARAMETERS: <expC> character string or memory variable of
Drive to check.
RETURNS: current directory of the drive specified in
<expC>, or if no parameter is specified, the
directory of the default drive.
PURPOSE: To find the current paths of specified drives.
NOTES: if no parameter is given, the default drive is
used, and if an invalid drive is specified, a null
string is returned. Errors will also return a null.
EXAMPLE:
m_var = CURR_DIR()
? "The default Directory is: "+m_var
SEE ALSO: MKDIR(), CHDIR(), RMDIR(), CURR_DRIVE(), SET_DRIVE()
ISDIR()
--------------------------------------------------------------
Asm 1a TIMEH() FUNCTION
______________________________________________________________
SYNTAX: mem_var = timeh()
PARAMETERS: none
RETURNS: time string in the format HH:MM:SS:SS
the last two digits are hundreths of a second.
PURPOSE: to time as accurately as possible procedures, and to
conduct time tests.
NOTES: none
EXAMPLE:
? timeh()
? "The time it took to print this is the difference"
? "between the two time strings."
? timeh()
SEE ALSO: SET_TIME(), SET_DATE()
--------------------------------------------------------------
Asm 1a ISDIR() FUNCTION
______________________________________________________________
SYNTAX: if isdir(<expC>)
PARAMETERS: <expC> character string or memory variable
RETURNS: logical .T. if directory exists, otherwise .F.
PURPOSE: To see if a particular directory is present
NOTES: if unsuccessful some reasons could be:
directory does not exist
directory name does not conform to DOS rules
Also, will return false if a CHDIR() is tried
without first trimming the <expC> parameter
because spaces after the root name are not allowed.
EXAMPLE:
if .not. isdir("B:\progs")
? "Can't find the program directory....."
else
! b:\progs\myprogram
endi
SEE ALSO: MKDIR(), CHDIR(), RMDIR(), CURR_DRIVE(), SET_DRIVE()
CURR_DIR()
--------------------------------------------------------------
Asm 1c DL_VERSION() FUNCTION
______________________________________________________________
SYNTAX: @ 10,0 say DL_VERSION()
PARAMETERS: none
RETURNS: <expC> Library name and version number
PURPOSE: to find out what version of Dirk Lesko's Library
you are presently using.
NOTES: none
EXAMPLE:
? DL_VERSION()
SEE ALSO: none
--------------------------------------------------------------
Asm 1c CSR_TOP() FUNCTION
______________________________________________________________
SYNTAX: mem_var = CSR_TOP()
PARAMETERS: none
RETURNS: <expN> integer of the cursors starting scan line
PURPOSE: to store the starting scan line before we
shut the sursor off
NOTES: the CGA uses 0 - 7 as it's starting/ending scan lines
the EGA/MDA uses 0 - 13 as starting/ending scan lines
if the <expN> parameter is 32 decimal, the
cursor has been turned off
EXAMPLE:
store 0 to m_top,m_bot
m_top = csr_top()
m_bot = csr_bot()
CURSOR(32,32) &&turn cursor off
&& do program with cursor off
CURSOR(m_top,m_bot) &&turn cursor on again
SEE ALSO: CURSOR(), CSR_BOT()
--------------------------------------------------------------
Asm 1c CSR_BOT() FUNCTION
______________________________________________________________
SYNTAX: mem_var = CSR_BOT()
PARAMETERS: none
RETURNS: <expN> integer of the cursors ending scan line
PURPOSE: to store the ending scan line before we
shut the sursor off
NOTES: the CGA uses 0 - 7 as it's starting/ending scan lines
the EGA/MDA uses 0 - 13 as starting/ending scan lines.
only values 0 - 13 have any effect on the cursor when
used as the ending scan line.
EXAMPLE:
store 0 to m_top,m_bot
m_top = csr_top()
m_bot = csr_bot()
CURSOR(32,32) &&turn cursor off
&& do program with cursor off
CURSOR(m_top,m_bot) &&turn cursor on again
SEE ALSO: CURSOR(), CSR_TOP()
--------------------------------------------------------------
Asm 1c ISPRINT() FUNCTION
______________________________________________________________
SYNTAX: if isprint(<expN>)
PARAMETERS: <expN> parallel printer port # to check
RETURNS: logical .T. if printer is online and is ready,
otherwise returns .F.
PURPOSE: to see if the printer is ready before we print
to it so as to avoid the (A)bort (R)etry message.
NOTES: if no paramater is given, LPT1 is used
EXAMPLE:
if .not. isprint(1)
? "Printer not ready, Please correct....."
else
set print on
? "Report # 2546, dated.........."
endif
SEE ALSO: RESET(), PRTSCR()