[so] do{ ...} while(0);

Razvan Deaconescu razvand at cs.pub.ro
Tue May 6 18:10:32 EEST 2008


On Tue, 2008-05-06 at 14:16 +0300, foxX wrote:
> inline void print_so_rules(const char *msg)  // c++; eroare cand msg e int
> {
>           puts(msg);
>           puts("Only RD loves macros at all");
> }

type-safety-ul este un dezavantaj mare al macro-urilor. Functiile inline
si enum-urile sunt recomandate pentru a scapa de acest dezavantaj. Sunt,
insa, situatii in care raman utile. Motiv pentru care sunt inca
utilizate pe scara larga intr-un numar mare de aplicatii.

Quote: "The C Programming Language—A language which combines the
flexibility of assembly language with the power of assembly language."

C is not an easy language, but ... oh ... the power! :-D

Razvan


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the so mailing list