Warning: simplexml_load_file() [function.simplexml-load-file]: http://www.morbleu.com/random-link.xml?ei=3%7C4%7C9%7C11%7C13%7C15%7C17%7C19%7C21%7C27%7C28%7C33%7C37%7C39%7C41%7C47%7C52%7C53%7C55%7C57%7C59%7C66%7C68%7C70%7C79%7C81%7C84%7C86%7C91%7C93%7C95%7C97%7C98%7C101%7C104%7C111%7C117%7C118%7C126%7C128%7C130%7C135%7C139%7C143%7C145%7C147%7C148%7C152%7C156%7C158%7C159%7C161%7C163%7C166%7C168%7C172%7C177%7C184%7C189%7C191%7C193%7C198%7C202%7C204%7C205%7C207%7C211%7C214%7C216%7C217%7C219%7C223%7C225%7C226%7C228%7C230%7C233%7C234%7C236%7C238%7C240%7C242%7C244%7C247%7C249%7C250%7C252%7C255%7C256%7C259%7C260%7C263%7C266%7C269%7C270%7C272%7C276%7C279%7C281%7C282%7C284%7C286%7C288%7C290%7C292%7C295%7C297%7C298%7C301%7C308%7C:6: parser error : Entity 'ldquo' not defined in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: <description>&ldquo; Sorte de jurement en usage m&ecirc;me parmi les gens de bo in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: http://www.morbleu.com/random-link.xml?ei=3%7C4%7C9%7C11%7C13%7C15%7C17%7C19%7C21%7C27%7C28%7C33%7C37%7C39%7C41%7C47%7C52%7C53%7C55%7C57%7C59%7C66%7C68%7C70%7C79%7C81%7C84%7C86%7C91%7C93%7C95%7C97%7C98%7C101%7C104%7C111%7C117%7C118%7C126%7C128%7C130%7C135%7C139%7C143%7C145%7C147%7C148%7C152%7C156%7C158%7C159%7C161%7C163%7C166%7C168%7C172%7C177%7C184%7C189%7C191%7C193%7C198%7C202%7C204%7C205%7C207%7C211%7C214%7C216%7C217%7C219%7C223%7C225%7C226%7C228%7C230%7C233%7C234%7C236%7C238%7C240%7C242%7C244%7C247%7C249%7C250%7C252%7C255%7C256%7C259%7C260%7C263%7C266%7C269%7C270%7C272%7C276%7C279%7C281%7C282%7C284%7C286%7C288%7C290%7C292%7C295%7C297%7C298%7C301%7C308%7C:6: parser error : Entity 'ecirc' not defined in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: <description>&ldquo; Sorte de jurement en usage m&ecirc;me parmi les gens de bo in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: http://www.morbleu.com/random-link.xml?ei=3%7C4%7C9%7C11%7C13%7C15%7C17%7C19%7C21%7C27%7C28%7C33%7C37%7C39%7C41%7C47%7C52%7C53%7C55%7C57%7C59%7C66%7C68%7C70%7C79%7C81%7C84%7C86%7C91%7C93%7C95%7C97%7C98%7C101%7C104%7C111%7C117%7C118%7C126%7C128%7C130%7C135%7C139%7C143%7C145%7C147%7C148%7C152%7C156%7C158%7C159%7C161%7C163%7C166%7C168%7C172%7C177%7C184%7C189%7C191%7C193%7C198%7C202%7C204%7C205%7C207%7C211%7C214%7C216%7C217%7C219%7C223%7C225%7C226%7C228%7C230%7C233%7C234%7C236%7C238%7C240%7C242%7C244%7C247%7C249%7C250%7C252%7C255%7C256%7C259%7C260%7C263%7C266%7C269%7C270%7C272%7C276%7C279%7C281%7C282%7C284%7C286%7C288%7C290%7C292%7C295%7C297%7C298%7C301%7C308%7C:6: parser error : Entity 'rdquo' not defined in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: &ldquo; Sorte de jurement en usage m&ecirc;me parmi les gens de bon ton. &rdquo; in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: http://www.morbleu.com/random-link.xml?ei=3%7C4%7C9%7C11%7C13%7C15%7C17%7C19%7C21%7C27%7C28%7C33%7C37%7C39%7C41%7C47%7C52%7C53%7C55%7C57%7C59%7C66%7C68%7C70%7C79%7C81%7C84%7C86%7C91%7C93%7C95%7C97%7C98%7C101%7C104%7C111%7C117%7C118%7C126%7C128%7C130%7C135%7C139%7C143%7C145%7C147%7C148%7C152%7C156%7C158%7C159%7C161%7C163%7C166%7C168%7C172%7C177%7C184%7C189%7C191%7C193%7C198%7C202%7C204%7C205%7C207%7C211%7C214%7C216%7C217%7C219%7C223%7C225%7C226%7C228%7C230%7C233%7C234%7C236%7C238%7C240%7C242%7C244%7C247%7C249%7C250%7C252%7C255%7C256%7C259%7C260%7C263%7C266%7C269%7C270%7C272%7C276%7C279%7C281%7C282%7C284%7C286%7C288%7C290%7C292%7C295%7C297%7C298%7C301%7C308%7C:6: parser error : Entity 'eacute' not defined in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: e jurement en usage m&ecirc;me parmi les gens de bon ton. &rdquo; (Littr&eacute; in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: http://www.morbleu.com/random-link.xml?ei=4%7C17%7C28%7C37%7C39%7C47%7C52%7C68%7C81%7C101%7C147%7C166%7C168%7C172%7C184%7C193%7C198%7C207%7C216%7C219%7C233%7C234%7C256%7C272%7C279%7C281%7C292%7C298%7C:6: parser error : Entity 'ldquo' not defined in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: <description>&ldquo; Sorte de jurement en usage m&ecirc;me parmi les gens de bo in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: http://www.morbleu.com/random-link.xml?ei=4%7C17%7C28%7C37%7C39%7C47%7C52%7C68%7C81%7C101%7C147%7C166%7C168%7C172%7C184%7C193%7C198%7C207%7C216%7C219%7C233%7C234%7C256%7C272%7C279%7C281%7C292%7C298%7C:6: parser error : Entity 'ecirc' not defined in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: <description>&ldquo; Sorte de jurement en usage m&ecirc;me parmi les gens de bo in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: http://www.morbleu.com/random-link.xml?ei=4%7C17%7C28%7C37%7C39%7C47%7C52%7C68%7C81%7C101%7C147%7C166%7C168%7C172%7C184%7C193%7C198%7C207%7C216%7C219%7C233%7C234%7C256%7C272%7C279%7C281%7C292%7C298%7C:6: parser error : Entity 'rdquo' not defined in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: &ldquo; Sorte de jurement en usage m&ecirc;me parmi les gens de bon ton. &rdquo; in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: http://www.morbleu.com/random-link.xml?ei=4%7C17%7C28%7C37%7C39%7C47%7C52%7C68%7C81%7C101%7C147%7C166%7C168%7C172%7C184%7C193%7C198%7C207%7C216%7C219%7C233%7C234%7C256%7C272%7C279%7C281%7C292%7C298%7C:6: parser error : Entity 'eacute' not defined in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: e jurement en usage m&ecirc;me parmi les gens de bon ton. &rdquo; (Littr&eacute; in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: http://www.morbleu.com/random-link.xml:6: parser error : Entity 'ldquo' not defined in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: <description>&ldquo; Sorte de jurement en usage m&ecirc;me parmi les gens de bo in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: http://www.morbleu.com/random-link.xml:6: parser error : Entity 'ecirc' not defined in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: <description>&ldquo; Sorte de jurement en usage m&ecirc;me parmi les gens de bo in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: http://www.morbleu.com/random-link.xml:6: parser error : Entity 'rdquo' not defined in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: &ldquo; Sorte de jurement en usage m&ecirc;me parmi les gens de bon ton. &rdquo; in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: http://www.morbleu.com/random-link.xml:6: parser error : Entity 'eacute' not defined in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: e jurement en usage m&ecirc;me parmi les gens de bon ton. &rdquo; (Littr&eacute; in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77
Langage C - Commentaires
  Accueil Accueil     Membres Membres     Forum Forum     Articles Articles     Download Download     Sondages Sondages     Outils Outils     Scriptland Scriptland     ProgBoards ProgBoards     FR  
  Morbleu ! Morbleu ! 
Cours de programmation, code source, aide au développement, forums d'entraide - CybWarrior

login Bug Contact RSS
login bug contact RSS


| Internet |
   Créer son site web

| Langages |
   HTML
   JavaScript
   Langage C
   PHP
   QBasic
   Turbo Pascal

| Programmation |
   Algorithmie
   Maths appliquées
   Windows

| Trucs & astuces |
   Lexique
   Oeufs de Pâques (easter eggs)
   Registre et Windows

| Téléchargements |
   Flash
   Freeware
   JavaScript
   NASM
   PHP
   QBasic
   Turbo Pascal
   Visual Basic / VBScript

Langage C - Commentaires

Autre langage disponible pour cet article : FR
Rubrique : Langage C
lundi 25 mars 2002 18:41

Voir les commentaires pour Langage C - Commentaires
Autres articles :
- Langage C - Introduction au langage C
- Langage C - Un premier programme
- Langage C - Commentaires
- Langage C - Les variables
- Langage C - Opérateurs
- Langage C - Structure conditionnelle
- Langage C - Les cas
- Langage C - Les boucles
- Langage C - Fonctions
- Langage C - Pointeurs
<< - >>

Comme tout langage, le C permet l'inclusion de commentaires dans le code source.
Un commentaire permet d'inclure du langage de tout les jours dans le programme. Cela permet de moins se perdre dans le programme lorsque l'on re-travaille dessus quelques mois plus tard, quand on travaille à plusieurs sur un même projets, ou tout simplement quand le code commence à se compliquer sérieusement.
Bien évidement, les commentaires ne sont pas executés. Il sont tout simplement ignorés par le compilateur.

En C, un commentaire commence par /* et s'acheve par */. Il n'en existe pas d'autre. Tout ce qui est compris entre /* et */ est alors ignoré :
/*Ceci est mon premier programme en langage C
Et ceci est un commentaire dans lequel je peux écrire
ce que je veux ! */

#include <stdio.h>

int main(){
puts("Hello World!");/* Cette ligne affiche "Hello World" à l'écran */
return 0;
}
Bien entendu, il faut tout de même observer certaines rêgles. Ça peut paraitre évident, mais on ne peut pas inclure de caractères */ à l'intérieur d'un commentaire. Sinon comment le compilateur pourai-t-il s'en sortir ?
Le commentaire ci-dessous est donc incorrect :
/* On utilise */ pour terminer un commentaire */
Comme on peut le voir dans l'exemple ci-dessus, un commentaire peut se trouver sur plusieurs lignes. Cette particularité est très utile lors de la mise au point d'un programme. On peut ainsi forcer le compilateur à ignorer certaines parties du code sans pour autant avoir à les effacer :
#include <stdio.h>

int main(){
puts("Bonjour");
puts("Joyeux noël");
puts("Bonne année");
/*puts("Joyeuses paques");
puts("et bon anniversaire!");*/
return 0;
}
Dans cette exemple, les lignes Joyeuses paques et et bon anniversaire! ne seront pas affichées, car pas executées.

Voir les commentaires pour Langage C - Commentaires
 06 juillet 2008 | Version 4.0.0 | © 2001 - 2007