In a recent note, "Thompson, Steve (SCI TW)" said:

> Date:         Mon, 31 Jul 2006 10:55:00 -0400
> 
> However, I have had to do this kind of thing in macros that we have had
> to capture to ensure correct code expansions (e.g., make sure they don't
> cause another macro to be generated a second time, such as IHAPSA).
> 
I believe it's a requirement of ANSI C that all standard library
headers should be coded so they may be #include'd repeatedly, and
subsequent invocations are benign.  This is usually accomplished
by similar conditional compilation.

And each library header must #include all its prerequisites so
the prerequisites are invisible to the end user.

IBM would have done well to follow such conventions uniformly.
They don't appear to, with some exceptions such as IATYREGS.
I tried to follow these conventions on an assembler project I
worked on once.  I was overruled by the IBM programmer culture
("If a definitions member needs to be COPYed in, I want to be
the one who codes the COPY, not another library member.")

> If I remember correctly, the "D" (Defined) attribute does not cause
> LOOK-AHEAD to take place -- But should LOOK-AHEAD have already taken
> place so that the "generation" or definition of YOUR code has occurred,
> I believe that HL-ASM ignores this and the AIF would fail and you would
> still generate the code. So the macro would have to be placed beyond the
> code where you would have your definitions (or end of the program as the
> case may be).
> 
Shouldn't it be the other way around, both the invocation of the
library macro and your conditional definition at the beginning
so LOOK-AHEAD will not have triggered the definition when the
conditional definition is encountered?

This is getting perilously near an ASSEMBLER-LIST thread.

-- gil
-- 
StorageTek
INFORMATION made POWERFUL

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to