Talk:Modulinos: Difference between revisions
→Ambiguities
(→Name change?: Easy search) |
|||
Line 36:
<lang c>#include "scriptedmain.h"</lang>
▲Meanwhile, this whole concept of "startup" is an OS issue, and not a language issue. Some operating systems have various ways of starting programs, and "main" may or may not be a part of them. (For example, using drag&drop to start a program might work differently from starting the program from a command line.)
Furthermore, different concepts of what this all means depend very much on how the code is represented. A compiled language may be represented as a shared library, or not, where an interpreted language may be represented as neither. But a compiled language may also be represented as source code. And if you have source code as a set of files, you could perhaps simply ignore the file that defines main (if the language even uses that name -- some might abstract it away even if the OS requires its use).
So, anyways, I think this task needs some work. Specifically, I think it needs some kind of illustration requirement (where the "scripted main" code gets used by some other code that has its own "main")
-- [[User:Rdm|Rdm]] 17:51, 4 March 2011 (UTC)
Test the C program yourself. As long as scriptedmain.h is missing the main() prototype, a second file test.c will not execute scriptedmain.c's main(). --[[User:Mcandre|Mcandre]]▼
:I see that you have updated the description of the C program, to specify that
scriptedmain.h is blank, so I have removed those comments that referred to this issue. However, since the example does not demonstrate the use of any API, I think the example is useless and unclear. (We have to imagine that we know what you are trying to illustrate.) --[[User:Rdm|Rdm]]
▲Test the C program yourself. As long as scriptedmain.h is missing the main() prototype, a second file test.c will not execute scriptedmain.c's main(). --[[User:Mcandre|Mcandre]]
|