home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
dscalc.zip
/
DSGO.SC
< prev
next >
Wrap
Text File
|
1990-01-23
|
7KB
|
156 lines
;───────────────────────────────────────────────────────────────────────────────
; DSCalc by Dave Schlieder. CopyRight Dave Schlieder 1989, 1990
; Shared Logic, Inc. All rights reserved
; 1016 Second Street
; Encinitas, Ca 92024
; (619)943-1086
; Version 1.10
;
;───────────────────────────────────────────────────────────────────────────────
;
; Everything you could want in a calculator and more!
; DSCalc is a full function calculator designed to run in Paradox.
;
; DSCalc was designed so that it can be added into any Paradox application
; and called upon no matter what the SysMode() of the current session is.
; All of the Variables used in DSCalc are declared as private and will not
; alter the state of any existing Variables.
; All of the Procedure names start with "DS." and can be reviewed using
; InfoLib(LIBNAME).
;
;
; DSCalc will return the last entry via retval if so chosen by the operator
; and can be evaluated to accept or reject it as required by the programmer.
; Return values are either numeric, False or Error.
;
; Of course DSCalc can be run by itself and perform all of the functions
; listed below:
;
; What can DSCalc do?
;
; 1) Basic four function math.
; 2) Display and print a running Tape (Up to 500 Entries).
; 3) Remember nineteen memory values (and save them for future use).
; 4) Trigonometry functions
; 5) Financial Calculations
; 6) On line Help
; 7) Custom setup
; 8) Add-on Custom Calculations
;
;───────────────────────────────────────────────────────────────────────────────
;
; How to call and start DSCalc.
; The call to DSCalc is:
;
; 1) DS.ApLib.a = Variable Name
;
; 2) ReadLib DS.ApLib.a DS.Calc.v
;
; 3) DS.Calc.v( Parameter List )
;
; 4) Return Retval
;
;
; EXPLANATIONS:
;
; Command 1) Assign to the variable DS.ApLib.a the name of the library
; that contains the procedures for DSCalc. This also defines
; to DSCalc a PRIVATE AutoLib for the rest of the procedures
; used by DSCalc. (This is supplied so that the full path
; name that contains the library may be included. Don't
; forget to use the double backslash when setting a path
; other than the current directory. ie "c:\\paradox3\\dscalc")
;
; Command 2) Read from the Library defined by the variable DS.ApLib.a the
; calling procedure for DSCalc.
;
; Command 3) Execute the procedure passing a parameter list.
;
; Command 4) Return the value returned by DSCalc.
;
;
; Parameter list:
;
; 1)
; DS.Calc.v(DS.ApLib.a,...,...,...,...,...)
; This is the name of the library that contains the procedures
; for DSCalc. It sets the PRIVATE AutoLib for DSCalc.
;
; 2)
; DS.Calc.v(...,Tape Length,...,...,...,...)
; A number that sets the tape length for DSCalc.
; A minimum length of 20 entries in the tape to a maximum of
; 500 entries. If no value is entered or an invalid entry is
; made, DSCalc defaults to 50. This number sets up four arrays
; in DSCalc so if memory may pose a problem, use the MINIMUM
; amount of tape entries that will be required.
;
; 3)
; DS.Calc.v(...,...,SetSwap Number,...,...,...)
; A number that sets SetSwap for DSCalc.
; The minimum SetSwap is 35000 and a maximum of MemLeft() is
; accepted. If no value is entered or an invalid entry is made,
; DSCalc defaults to 35000. The higher the SetSwap is set, the
; slower DSCalc will run as it swaps Procedures and Variables
; in and out of memory.
;
; 4)
; DS.Calc.v(...,...,...,Save Memory,...,...)
; Legal entries are either True or False. If no entry is made or
; an invalid entry is made, DSCalc defaults to False.
; When set to True, DSCalc will play a script called DSSvMem to
; re-assign to memory any Variables saved by an earlier use of
; DSCalc (if it exists) and upon exiting, it will re-save the memory
; variables. To save the memory arrays, DSCalc uses print file
; to create the script in the private directory. If that script
; already exists, the application uses the RUN command to delete
; the existing file.
;
; 5)
; DS.Calc.v(...,...,...,...,Set Custom AutoLib,...)
; Any string entry here sets an Autolib for any custom menus and/or
; formulas defined by the programmer. See the script "DSCustom"
; for an example of how to add in a custom formula to the calculator.
; Must be a valid library for the custom functions to work within
; the calculator.
;
; 6)
; DS.Calc.v(...,...,...,...,...,Printer On/Off)
; The only accepted value for this parameter is "On" (Any Case i.e.
; "ON", "oN", "On", and "on" are all acceptable). When the parameter
; is set to "On", then when requested by the user, DSCalc will send
; the current contents of the tape to the current ONLINE printer
; at the time of the request whether it be LPT1, LPT2, etc. DSCalc
; simply checks printer status with PrinterStatus().
; Beware: PrinterStatus() always returns True if the printer port
; has been set to LPT2 or any port other than LPT1 and the printer
; is off, offline, or even non-existent. On some fast machines such
; as a 386, PrinterStatus() may return True no matter what the status
; really is on the first check of PrinterStatus(), therefore
; DSCalc checks the PrinterStatus() twice.
;───────────────────────────────────────────────────────────────────────────────
ds.aplib.a = sdir() + "dscalc"
; assignment may be modified by user if the library has
; been renamed or resides in a different directory.
if not isfile( ds.aplib.a + ".lib" ) then
if not isfile( sdir() + "dscalc.sc" ) then
beep
sleep 250
beep
message "The library and the main scripts for DSCalc do" +
" not exist! Press a key."
ds.aplib.a = getchar()
return
endif
play sdir() + "dscalc"
endif
readlib ds.aplib.a ds.calc.v
ds.calc.v(ds.aplib.a,"","","","","")
return retval