home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 15
/
CD_ASCQ_15_070894.iso
/
vrac
/
dnalib7a.zip
/
PERCENT.BAS
< prev
next >
Wrap
BASIC Source File
|
1994-05-14
|
1KB
|
38 lines
SUB Percentage(Percent%,Row%,Col%,Attr%,TextAttr%)PUBLIC
$CODE SEG "DNASEG2"
FGround% = 15 AND Attr%
BGround% = 255 AND (Attr% - FGround%) / 16
TextFG% = 15 AND TextAttr%
TextBG% = 255 AND (TextAttr% - TextFG%) / 16
IF SCREEN(Row%,Col%) <> 48 THEN 'check and see if back drop is there
LOCATE Row%,Col%,0:COLOR TextFG%,TextBG%
PRINT "0 20 40 60 80 100";
LOCATE Row% + 1,Col%,0:COLOR FGround%,BGround%:PRINT STRING$(50,32);
ELSE
IF ISFALSE Percent% THEN 'repaint the screen if 0
LOCATE Row%,Col%,0:COLOR TextFG%,TextBG%
PRINT "0 20 40 60 80 100";
LOCATE Row% + 1,Col%,0:COLOR FGround%,BGround%:PRINT STRING$(50,32);
END IF
END IF
COLOR FGround%,BGround%
FOR i% = 1 TO Percent%
IF (i% AND 1) = 1 THEN
IF SCREEN(Row% + 1,(i% \ 2) + Col%) <> 219 THEN
LOCATE Row% + 1,(i% \ 2) + Col%,0:PRINT CHR$(221);
END IF
ELSE
IF SCREEN(Row% + 1,(i% \ 2) + (Col% - 1)) <> 219 THEN
LOCATE Row% + 1,(i% \ 2) + (Col% - 1),0:PRINT CHR$(219);
END IF
END IF
NEXT i%
END SUB