On Feb 23, 2022, at 16:24:53, Charles Mills wrote: > > A little OT for an assembler list but in case anyone cares: > > https://www.cplusplus.com/reference/map/map/ > > It is a C++ "template" function, which works kind of like an HLASM macro > (*not* like a C macro, which is more like an HLASM SETC symbol). *Kind of* > like: please no need for anyone to tell me it is not exactly the same. > But consider: #define sum( x, y) ( ( x ) + ( y ) )
... C has polymorphic operators so this generates code appropriate to its operand types. > It "builds" code at compile time specific to your data types, much like some > HLASM macro might generate an L if your data was in a fullword but an LH if > it were in a halfword, or an LR or LHI for a register or a symbol. > That takes a lot of AIFs. CDC ASCENT could do that with no conditionals since register names were reserved symbols with types known to ASCENT. A consequence was that CDC programmers found habitual PRINT GEN alien since ASCENT could be trusted to DWIM -- no unintended register reference when a programmer unwittingly used parentheses; no IHBINRRA. -- gil
