472,374 Members | 1,113 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,374 software developers and data experts.

Is there a difference between a "module" and a "compilation unit" ?

Bob

Are they different names for the same concept ?

Nov 14 '05 #1
5 3502
In article <cn********************************@4ax.com>
Bob <bo*@bob.bob> wrote:
Are they different names for the same concept ?
[For clarity about the pronoun "they", I will repeat the subject
line for those whose news-delivery systems mangle it:]
Is there a difference between a "module" and a "compilation unit" ?


That depends on who does the defining, no? :-)

The C standards define the term "translation unit". They do not
define either "compilation unit" or "module". Thus, this newsgroup
(comp.lang.c) cannot give you a definitive answer to the question.

In languages that actually have modules (such as Modula-2 and
Modula-3), I might claim there is a subtle difference, in that
a module may require more than one compilation step and each
such step could be termed a "unit". But you would have to define
these terms with respect to C before you could get an answer.
--
In-Real-Life: Chris Torek, Wind River Systems
Salt Lake City, UT, USA (40°39.22'N, 111°50.29'W) +1 801 277 2603
email: forget about it http://web.torek.net/torek/index.html
Reading email is like searching for food in the garbage, thanks to spammers.
Nov 14 '05 #2
Bob
On 20 Mar 2005 20:25:44 GMT, Chris Torek <no****@torek.net> wrote:
Is there a difference between a "module" and a "compilation unit" ?
That depends on who does the defining, no? :-)


Yes.
The C standards define the term "translation unit". They do not
define either "compilation unit" or "module". Thus, this newsgroup
(comp.lang.c) cannot give you a definitive answer to the question.


So be it: "translation unit" will be used (by me) from now on. :-)

Thanks.

Nov 14 '05 #3
Bob wrote:

On 20 Mar 2005 20:25:44 GMT, Chris Torek <no****@torek.net> wrote:
Is there a difference between a "module" and a "compilation unit" ?


That depends on who does the defining, no? :-)


Yes.
The C standards define the term "translation unit". They do not
define either "compilation unit" or "module". Thus, this newsgroup
(comp.lang.c) cannot give you a definitive answer to the question.


So be it: "translation unit" will be used (by me) from now on. :-)


A translation unit is the output of the preprocessor.
A translation unit consists of a sequence of external declarations.

--
pete
Nov 14 '05 #4
pete wrote:
-> Bob wrote:
-> > Chris Torek <no****@torek.net> wrote:
-> > > > Is there a difference between a "module" and a
-> > > > "compilation unit" ?
-> > >
-> > > That depends on who does the defining, no? :-)
-> >
-> > Yes.
-> >
-> > > The C standards define the term "translation unit". They do
-> > > not define either "compilation unit" or "module". Thus, this
-> > > newsgroup (comp.lang.c) cannot give you a definitive answer
-> > > to the question.
-> >
-> > So be it: "translation unit" will be used (by me) from now on. :-)
->
-> A translation unit is the output of the preprocessor.
-> A translation unit consists of a sequence of external declarations.

Section 5 says... "An implementation translates C source files..."

"Source file" probably makes more sense than translation unit, or
preprocessing translation unit (which by definition may consist of
more than one file.)

Although programming has the concept of modules, C generally doesn't.
There is no immediate way to share objects with external linkage
exclusively within a select group of source files.

--
Peter

Nov 14 '05 #5
Bob
On 21 Mar 2005 03:19:54 -0800, "Peter Nilsson" <ai***@acay.com.au>
wrote:
Although programming has the concept of modules, C generally doesn't.
There is no immediate way to share objects with external linkage
exclusively within a select group of source files.


Exactly. Something like what Delphi does for example, if I'm not
mistaken.
Nov 14 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Mark Harrison | last post by:
I have a set of configuration files that are expressed in python. Users can set up triggers and callbacks as python function calls. Some of these functions have become shared between several...
36
by: Andrea Griffini | last post by:
I did it. I proposed python as the main language for our next CAD/CAM software because I think that it has all the potential needed for it. I'm not sure yet if the decision will get through, but...
9
by: Peter Hansen | last post by:
The term "mock filesystem" refers to code allowing unit or acceptance tests to create, read and write, and manipulate in other ways "virtual" files, without any actual disk access. Everything is...
51
by: Noam Raphael | last post by:
Hello, I thought about a new Python feature. Please tell me what you think about it. Say you want to write a base class with some unimplemented methods, that subclasses must implement (or...
1
by: Darran Edmundson | last post by:
I was playing around with the inspect module the other day trying to write a quick and dirty "smart" logger. By this I mean that writing a message to the global log would also yield some info...
5
by: Steven T. Hatton | last post by:
I've seen people here write that C++ doesn't support modules. What does that mean? 'Module' is a very nebulous term in my book. It probably means something quite different to me than what it does...
205
by: Jeremy Siek | last post by:
CALL FOR PAPERS/PARTICIPATION C++, Boost, and the Future of C++ Libraries Workshop at OOPSLA October 24-28, 2004 Vancouver, British Columbia, Canada http://tinyurl.com/4n5pf Submissions
4
by: user | last post by:
Hi. Sorry for the probable dumbness of my question, but the behaviour I'm observing seems a blatant defect in the C++ Standard or in the implementation I'm using (several different versions of...
5
by: Verde | last post by:
I'm learning about .NET assemblies and in the documentation there is mention of "module" or "modules" within an assembly. For example, the Assembly class has a GetModules method. What is a...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
0
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.
0
DizelArs
by: DizelArs | last post by:
Hi all) Faced with a problem, element.click() event doesn't work in Safari browser. Tried various tricks like emulating touch event through a function: let clickEvent = new Event('click', {...
0
by: F22F35 | last post by:
I am a newbie to Access (most programming for that matter). I need help in creating an Access database that keeps the history of each user in a database. For example, a user might have lesson 1 sent...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.