Category : Files from Magazines
Archive   : DBMS0191.ZIP
Filename : OLYMPIA1.JAN

 
Output of file : OLYMPIA1.JAN contained in archive : DBMS0191.ZIP

LISTING 1 for Olympia/jan 91

PROCEDURE L_TBAR
*/ Displays the percent of processing completed, N_Current/N_Total.
*************************************************************
* PROCEDURE ....... : L_TBAR
* VERSION ......... : $Revision$
* LAST EDITED ON .. : $Date$
* LANGUAGE ........ : FoxPro
* CALLS TO ........ : L_Quote (see DBMS, 8/90 issue)
* PURPOSE ......... : Displays the percent of processing which has been
* : completed based upon the number of items or steps
* : which has been processed (N_Current) as a %
* : of the total number to be processed (N_Total).
* : The calling program is responsible for incrementing
* : the N_Current parameter each time through the
* * processing loop or at appropriate intervals.
* CALLING SEQUENCE : DO L_TBAR WITH , ,
* LOCAL VARIABLES . : PCent, W_Tbar, Puffin
* GLOBAL VARIABLES : Begintime
* PARAMETERS ...... : N_Current, N_Total, C_Message
***************************************************************************

PARAMETERS N_Current, N_Total, C_Message

PRIVATE PCent, Puffin

* Initialize the local variables.
PCent = N_Current * 10 / N_Total

* Is this the first call?
IF .NOT. WEXIST('W_Tbar')
* Create the window display.
DEFINE WINDOW W_Tbar FROM 16,17 TO 22,62 DOUBLE COLOR +W/B
ACTIVATE WINDOW W_Tbar
@ 0,2 SAY PADC(C_Message,40) COLOR +W/B
@ 1,6 TO 3,37 COLOR +W/B
@ 4,6 SAY '0 1 2 3 4 5 6 7 8 9 10' COLOR W/B

* Turn off the cursor.
x = SYS(2002)

* Display the first quotation.
Begintime = VAL(SYS(2)) - Interval - 1
DO L_QUOTE
ENDIF

* Update thermometer display?
IF PCent > 0
* Display percent complete.
IF .NOT. WONTOP('W_Tbar')
ACTIVATE WINDOW W_Tbar
ENDIF
@ 2,7 SAY REPLICATE(CHR(219), ROUND(PCent*3,0)) COLOR W/B

* Is it time for a new quote from the Cookie database?
DO L_QUOTE

* Check for completion of processing.
IF N_Current >= N_Total
Puffin = INKEY(1)
DEACTIVATE WINDOW W_Tbar
RELEASE WINDOW W_Tbar

* Turn on the cursor.
x = SYS(2002,1)

* Clear the quote from the screen.
PrevWindow = IIF('' = WONTOP(), 'SCREEN', 'WINDOW '+WONTOP())
ACTIVATE SCREEN
@ 24,1 CLEAR TO 24,79
ACTIVATE &PrevWindow

ENDIF

ENDIF

RETURN


  3 Responses to “Category : Files from Magazines
Archive   : DBMS0191.ZIP
Filename : OLYMPIA1.JAN

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/