Re: How does Require deal with multiple files of the same name in different directories
- From: Coos Haak <chforth@xxxxxxxxx>
- Date: Thu, 10 Aug 2006 23:06:11 +0200
Op 10 Aug 2006 01:34:56 -0700 schreef George Hubert:
Marcel Hendrix wrote:
"George Hubert" <georgeahubert@xxxxxxxxxxx> writes Re: How does Require deal with multiple files of the same name in
[..]
I tend to agree if no file in the search path can possibly match (so[ ... etcetera. ]
include would fail anyway) a check could be made for any file and if
one exists assume it's correct (pssibly issuing a warning). The problem
Please, isn't REQUIRE a tool for development? If REQUIRE reloads a file
that actually is loaded already, the recompilation takes a few milliseconds
longer than it should. If it fails to load a new version of a file already
loaded, why not explicitly forget the old code and recompile from scratch?
Re-loading the file may have unexpected consequences e.g.
The function of REQUIRE is one-time loading. So the following doesn't
occur:
1) The file begins with an ANEW MyMarker so all code between the first
load
and the re-load is forgotten.
2) A list of re-definition warnings.
3) Some files re-initialise certain things when loaded (and in those
cases add
code to do this at start-up to the initialisation chain) which can
cause problems.
You're describing the function of INCLUDE
It may reload the same file and execute MARKERS and ANEW with probably
fatal consequences. REQUIRE doesn't.
--
Coos
CHForth, 16 bit DOS applications
http://home.hccnet.nl/j.j.haak/forth.html
.
- Follow-Ups:
- References:
- How does Require deal with multiple files of the same name in different directories
- From: George Hubert
- Re: How does Require deal with multiple files of the same name in
- From: George Hubert
- Re: How does Require deal with multiple files of the same name in different directories
- From: Marcel Hendrix
- Re: How does Require deal with multiple files of the same name in different directories
- From: George Hubert
- How does Require deal with multiple files of the same name in different directories
- Prev by Date: Re: Forth fibonacci shootout
- Next by Date: Re: New FORTH project commited to freshmeat.net
- Previous by thread: Re: How does Require deal with multiple files of the same name in different directories
- Next by thread: Re: How does Require deal with multiple files of the same name in different directories
- Index(es):
Relevant Pages
|