Re: Newbie making a dumb mistake but can you help?



JustMe2 <do_mail@xxxxxxx> wrote:

if i put both in the same file it will compile link and run. I guess I
don't understand what the .mod file is for. If I have to link the obj
file as well then why would I want to use the .mod files?

You don't have a choice, actually. The .mod file is part of how modules
work. In particular, the .mod file is used at compile time (*NOT* link
time) to communicate information from the module to whatever USEs the
module. In essence, the USE statement tells the compiler to read the
..mod file to get information about the module. WIthout it, the compiler
would have no idea what is in the module and would not be able to use it
correctly.

--
Richard Maine | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain
.



Relevant Pages

  • ot/flog: a lisp of mine
    ... recently I have written a compiler. ... had erlang style processes/message passing (broke with the compiler for ... float)) int ... define obj ...
    (comp.lang.lisp)
  • Re: Teaching new tricks to an old dog (C++ -->Ada)
    ... attributes helps both the writer and the compiler. ... > catch at compile time any out of boundaries access. ... C++ array like types don't have these properties. ... Maybe, if one gets used to template programming, the basis of the ...
    (comp.lang.ada)
  • Re: Teaching new tricks to an old dog (C++ -->Ada)
    ... attributes helps both the writer and the compiler. ... > catch at compile time any out of boundaries access. ... C++ array like types don't have these properties. ... Maybe, if one gets used to template programming, the basis of the ...
    (comp.lang.cpp)
  • Re: Expressing physical units (Was: Reprise: in out parameters for functions)
    ... Dealing with units unknown at compile time. ... knots. ... If you divide nmi by sec, the compiler coughs and tells you ...
    (comp.lang.ada)
  • Re: Is there a better way?
    ... I can freely modify the contents of foo, ... Part of the issue is that C doesn't really have the full language ... Processing done by C at compile time is ... the interpreter and the compiler are permitted to ...
    (comp.lang.lisp)