How to create a function declaration?

Tyler Knott tywebmail at mailcity.com
Fri Jan 12 13:11:46 PST 2007


Sean Kelly wrote:
> This one has bitten me a few times where I had declared the prototype 
> for a C library routine to avoid importing the entire header module, and 
> a derived module imported both my module and the C header module.  Even 
> worse, the same error will occur if one of the two declarations is 
> private, because of how symbol resolution is handled.  This makes the 
> approach outlined above completely intractable, and actually more 
> restrictive than C where multiple prototypes of the same function are 
> allowed.

What's wrong with importing the entire header module?  That's what 
modules are designed for: avoiding declaring the same function multiple 
times.  They also don't add any code bloat.


More information about the Digitalmars-d-learn mailing list