home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-386-Vol-2of3.iso
/
b
/
baswiz19.zip
/
BW$BAS.ZIP
/
BCDFRAC.BAS
< prev
next >
Wrap
BASIC Source File
|
1993-01-29
|
1KB
|
26 lines
' +----------------------------------------------------------------------+
' | |
' | BASWIZ Copyright (c) 1990-1993 Thomas G. Hanlin III |
' | |
' | The BASIC Wizard's Library |
' | |
' +----------------------------------------------------------------------+
DECLARE FUNCTION BCDFormat$ (Nr AS STRING, HowToFormat%, RightDigits%)
DECLARE FUNCTION BCDSet$ (NumSt$)
DECLARE SUB BCDGetSize (LeftDigits AS INTEGER, RightDigits AS INTEGER)
DEFINT A-Z
FUNCTION BCDFrac$ (Nr AS STRING)
BCDGetSize LDigits, RDigits
St$ = BCDFormat$(Nr, 0, RDigits)
tmp = INSTR(St$, ".")
IF tmp THEN
St$ = "0" + MID$(St$, tmp)
ELSE
St$ = "0"
END IF
BCDFrac$ = BCDSet$(St$)
END FUNCTION