[ Pretender @ 02.12.2003. 14:31 ] @
Hi, svima.
Imam pitanje.
Citat:
The second problem is that macros are expanded inline each time they are used. This means that if a macro is used a dozen times, the substitution will appear 12 times in your program, rather than appear once as a function call will.
i
Citat:
The fact that they are expanded inline leads to the third problem, which is that the macro does not appear in the intermediate source code used by the compiler, and therefore is unavailable in most debuggers.


O kakvom se to prosirivanju u liniji ovde radi ?
Kakve veze ima broj poziva sa kodom u liniji ?


Hvala
[ milanche @ 02.12.2003. 18:13 ] @
Tacno tako kako kaze:
Ako napises funkciju, kod te funkcije ti zauzima svoje mesto u programskoj
memoriji tacno jedamput. Ako napises makro, preprocesor ubacuje njegov
kod svugde gde si makro stavio. Ako si ga upotrebio N puta, kod makroa ce
zauzimati N puta vise mesta.

Druga stvar: debugger-i ne podrzavaju makroe. Ne mozes direktno
debagovati da li makro radi kako treba ili ne, nego moras ili cesati glavu sa
distance, ili napisati kod u vidu funkcije pa videti sta ne valja.