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

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

*************** PROGRAM LISTING 3A *****************
* Sleep.PRG
* A program stub for testing the pause() function written in C

* Author: Jack Ho
* Occupation: Network Planning Officer
* Canada Post Corporation
* Member: VCDA
* Date: September 1, 1990

* To be placed in public domain with no strings attached
* Disclaimer - No warranty whatsoever. Use it at your own risk

* Clipper compiling command: CLIPPER SLEEP -m

CLEAR
secs = 0
@ 10, 10 SAY "Number of seconds to sleep? " GET secs PICT "99"
READ
pause(secs)
RETURN


*************** PROGRAM LISTING 3B *****************
/* pausekey.c - function to replace the Clipper INKEY() */
/* but not the INKEY(0). A DBXL SLEEP simulation */

/* MS Quick C compiling command: qcl /c /Gs /AL /Zl pausekey.c */
/* Linking command: link /NOE sleep pausekey ,,, clipper.lib + */
/* extend.lib + llibce.lib */

#include
#include
#include "nandef.h"
#include "extend.h"

extern long time ();

CLIPPER pause (seconds)
int seconds;
{
int nothing = 0;
long kount;
time (&kount);
seconds = _parni (1);

while ((time ((long *) NULL) - kount) < seconds)
{
/* executing the "do nothing" loop until time's up */
}
_retni (nothing);
}


  3 Responses to “Category : Files from Magazines
Archive   : DBMS0191.ZIP
Filename : TECHTIP3.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/