community.borland.com

Article #25713: What purpose does the word proto serve in the function prototype?

Problem:
I am just starting to use the InterBase API.  I notice that the example programs all have the 
word 'proto' in the function prototype.  What does this mean?  Why is it there?

Solution:
'PROTO' is a macro defined by InterBase to make the function headers compilable on the platform
the user is running. Otherwise, differences in compilers from say, NT to VMS systems might make it
so that code that would compile under VMS would not compile under NT.

Here is an example of the 'PROTO' macro in action. This example is taken from stat1.e, in the InterBase
examples directory:

int do_save PROTO((void));

The use of PROTO here will fix up this function prototype so it will compile on all the hardware InterBase 
runs.  You will find the definition of the PROTO macro in the "example.h" file.

Last Modified: 23-OCT-00