Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | "BartC" <bc@freeuk.com> |
|---|---|
| Newsgroups | comp.lang.c |
| References | (1 earlier) <53163C3C.8060203@verizon.net> <5316406C.9050905@verizon.net> <lf74lv$s1q$1@dont-email.me> <X9FRu.230858$IS.94538@fx01.am4> <lf78hn$nat$1@dont-email.me> |
| Subject | Re: complex declarations |
| Message-ID | <0gIRu.3381$0X5.30@fx31.am4> (permalink) |
| Organization | virginmedia.com |
| Date | 2014-03-05 16:26 +0000 |
"James Kuyper" <jameskuyper@verizon.net> wrote in message news:lf78hn$nat$1@dont-email.me... > On 03/05/2014 07:56 AM, BartC wrote: >> "Robbie Brown" <dac@nomail.invalid> wrote in message >> news:lf74lv$s1q$1@dont-email.me... > ... >> But, if any of your functions are exported to another module, then you >> will >> need to produce prototypes for that module anyway. (Actually all C >> functions >> are exported unless you declare them with 'static'. You can also call >> them >> from elsewhere without a prototype; that's how C used to work. These days >> prototypes for exported/imported functions are a good idea.) > > Note to Robbie: Bartc is primarily interested in designing his own > language, (Not quite true, I've been trying to avoid doing so. However....) > and uses the term "export" to describe a feature of that > language. This term has no well-defined meaning in C. C functions have > external linkage unless declared 'static', in which case they have > internal linkage. If you define a function F in translation unit A, to be called from translation unit B, would anyone really be completely flummoxed if I described F as being exported from A, and imported by B? And I tend to declare such a function F (even when writing C), with a 'global' prefix (an empty macro) in A, and with an 'extern' prefix in B. Proper C of course prefers to use no prefix when declaring F when it is defined in A, and no prefix either when declaring it in B, just to make it perfectly clear what is what! With un-exported local functions needing a 'static' prefix, obviously. -- Bartc
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
complex declarations Robbie Brown <dac@nomail.invalid> - 2014-03-04 20:18 +0000
Re: complex declarations James Kuyper <jameskuyper@verizon.net> - 2014-03-04 15:49 -0500
Re: complex declarations James Kuyper <jameskuyper@verizon.net> - 2014-03-04 16:06 -0500
Re: complex declarations Robbie Brown <dac@nomail.invalid> - 2014-03-05 12:18 +0000
Re: complex declarations "BartC" <bc@freeuk.com> - 2014-03-05 12:56 +0000
Re: complex declarations James Kuyper <jameskuyper@verizon.net> - 2014-03-05 08:24 -0500
Re: complex declarations "BartC" <bc@freeuk.com> - 2014-03-05 16:26 +0000
Re: complex declarations James Kuyper <jameskuyper@verizon.net> - 2014-03-05 08:13 -0500
Re: complex declarations Robbie Brown <dac@nomail.invalid> - 2014-03-05 13:32 +0000
Re: complex declarations Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-03-05 14:32 +0000
Re: complex declarations Robbie Brown <dac@nomail.invalid> - 2014-03-04 21:42 +0000
Re: complex declarations Keith Thompson <kst-u@mib.org> - 2014-03-04 14:04 -0800
Re: complex declarations Robbie Brown <dac@nomail.invalid> - 2014-03-05 09:22 +0000
Re: complex declarations James Kuyper <jameskuyper@verizon.net> - 2014-03-05 07:29 -0500
Re: complex declarations Keith Thompson <kst-u@mib.org> - 2014-03-05 08:38 -0800
Re: complex declarations James Kuyper <jameskuyper@verizon.net> - 2014-03-04 17:05 -0500
Re: complex declarations Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-03-04 21:15 +0000
Re: complex declarations "BartC" <bc@freeuk.com> - 2014-03-04 21:38 +0000
Re: complex declarations Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-03-04 23:27 +0000
Re: complex declarations Robbie Brown <dac@nomail.invalid> - 2014-03-04 21:59 +0000
Re: complex declarations James Kuyper <jameskuyper@verizon.net> - 2014-03-04 17:12 -0500
Re: complex declarations Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-03-05 00:28 +0000
Re: complex declarations Robbie Brown <dac@nomail.invalid> - 2014-03-05 09:10 +0000
Re: complex declarations Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-03-05 11:44 +0000
csiph-web