function prototype


Also found in: Dictionary, Thesaurus, Medical, Legal, Wikipedia.
Related to function prototype: function call

function prototype

In programming, a declaration of a function to the compiler indicating what types of parameters are passed to it and what value is returned. The compiler can then report an error if a function within the program is not written to conform to the prototype. See function.

The following C example is the simplest prototype. The function displays "Hello World" on screen without receiving any parameters or returning any values to the calling instruction. "Void" means "nothing."

Prototype

      void printHelloWorld(void);


      Function

      void printHelloWorld(void)
      {
      printf ("Hello World\n");
      }


Prototypes can be much more complicated as in this C example where five parameters are passed to a graphics function.

 void  DrawTransparentBitmap(HDC hdc,
          HBITMAP hBitmap,
          int xStart,
          int yStart,
          COLORREF cTransparentColor);
References in periodicals archive ?
2) start-up and testing, and test the function prototypes developed, in particular with regard to state correctness of assumptions and functional design with the guarantee of proper execution.
Library components are provided with standard C-language function prototypes, allowing them to be easily invoked, using the same function calling methods C programmers are familiar with.
The Milkyway C-API comprises the function prototypes and linkable libraries that allow a stand-alone program to read and write data in the Milkyway database.

Full browser ?