On 10/12/2006 at 4:31 PM Steve Thatcher wrote:
let's see - I said that the external was the
important declaration.
The assembler would declare it unreachable if the symbol did not
exist in the current module unless you used external, SO it is not
the same thing...
The difference eludes me. Maybe we're just trying to say the same thing.
If a call target isn't defined by pass 2, it isn't in the module. If the
symbol didn't exist in the current module after pass 2, the assembler
wouldn't declare it as unreachable; it would declare it as "undefined".
EXTERN declares it at pass 2 time and solves the problem--at least as far
as the assembly is concerned. If the symbol name is a typo, then there
will be a LINK error.
Note that you can't do this in MASM 6 or 7 native mode. IF2 isn't allowed
unless you specify MASM 5 compatiblity (/Zm).
Cheers,
Chuck