Thursday, February 19, 2015

Learning C Functions : delay ( Dos Only )

C Programming :
Function
:
delay

Syntax


#include <dos.h>
void delay(unsigned milliseconds);

Description

With a call to delay, the current program is suspended from execution for the number of milliseconds specified by the argument milliseconds. It is no
longer necessary to make a calibration call to delay before using it. delay is accurate to a millisecond.

Return Value

None.

Example :
/* delay example */

/* emits a 440-Hz tone for 500 milliseconds */
#include <dos.h>

int main(void)
{
   sound(440);
   delay(500);
   nosound();
   return 0;
}

No comments:

Post a Comment