home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Du Jour
/
SoftwareDuJour.iso
/
BUSINESS
/
DBASE
/
DBAPG.ARC
/
MATH-.PRG
< prev
next >
Wrap
Text File
|
1984-08-12
|
2KB
|
66 lines
* Program.: MATH-.PRG
* Author..: Luis A. Castro
* Date....: 01/19/84
* Notice..: Copyright 1984, Luis A. Castro, All Rights Reserved.
* Version.: dBASE II, version 2.4x
* Notes...: Front-end program to utilize the SQUARE ROOT,
* EXPONENT, and NATURAL LOGARITHM subroutines.
* Local...: select, string, number, row
*
SET TALK OFF
SET BELL OFF
SET RAW ON
SET COLON OFF
ERASE
@ 2, 0 SAY "DEMONSTRATION of MATH ROUTINES"
@ 2,72 SAY DATE()
@ 3, 0 SAY "========================================"
@ 3,40 SAY "========================================"
STORE 10 TO row
STORE "X" TO select
DO WHILE select <> " "
@ 9,0
STORE " " TO select
@ 5,0 SAY "1. SQROOT() = square root "
@ 6,0 SAY "2. EXPONENT() = exponent "
@ 7,0 SAY "3. NATLOG() = natural logarithm "
@ 8,0 GET select PICTURE "!"
READ
IF select = " " .OR. .NOT. select $ "123"
LOOP
ENDIF
@ 8,0 SAY " "
ACCEPT "ENTER A NUMBER " TO string
IF string = " "
LOOP
ENDIF
@ row,0 SAY " "
STORE VAL(string) TO number
* ---Execute a math routine.
DO CASE
CASE select = "1"
* ---SQUARE ROOT.
? " SQROOT (",string,") = "
DO Sqroot
?? root
CASE select = "2"
* ---EXPONENT.
? " EXPONENT (", string, ") = "
DO Exponent
?? exponent
CASE select = "3"
* ---NATURAL LOGARITHM.
? " NATLOG (", string, ") = "
DO Natlog
?? natlog
ENDCASE
STORE row + 1 TO row
ENDDO
SET COLON ON
SET RAW OFF
SET BELL ON
SET TALK ON
RELEASE select, string, number, row
RETURN
* EOF: MATH-.PRG