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
QBasic - Les constantes
  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

QBasic - Les constantes

Autre langage disponible pour cet article : FR
Rubrique : QBasic
lundi 25 mars 2002 18:44

Voir les commentaires pour QBasic - Les constantes
Autres articles :
- QBasic - Introduction au QBasic
- QBasic - Ecrire sur l'écran
- QBasic - Mathématiques élémentaires
- QBasic - La ponctuation (syntaxe)
- QBasic - Les variables
- QBasic - Les commentaires
- QBasic - Les constantes
- QBasic - Entrée de données
- QBasic - Les boucles inconditionnelles
- QBasic - Les boucles conditionnelles
- QBasic - Structure conditionnelle
- QBasic - Les cas
- QBasic - Maths, logique et divers
- QBasic - Le texte
- QBasic - Le son
- QBasic - Dessiner
- QBasic - Sous-programmes, fonctions et procedures
- QBasic - Les types de variables
- QBasic - Les tableaux
- QBasic - Les types personalisés
- QBasic - L'organisation des données
- QBasic - QBasic et le système d'exploitation
- QBasic - L'accès aux fichiers
- QBasic - Le traitement des erreurs
- QBasic - La manette de jeu
- QBasic - Encore plus loin dans le graphisme
- QBasic - La mémoire
- QBasic - Le langage machine et la souris
- QBasic - L'heure, la date, le temps
- QBasic - Le clavier
<< - >>

À l'opposé des variables, il y a les constantes. Une constante ne varie pas. Ca peut être par exemple :
5
3.14159265458
78925656
5 ne varie pas. C'est toujours 5. De même pour 78925656 et 3.14159265458. Ils ne varient pas. Maintenant, imaginons un programme qui ait besoin d'utiliser à plusieurs reprises le nombre PI. Au lieu d'écrire à chaque fois 3.14159265458, on peut définir une constante 'PI' qui ne variera pas et que l'on pourra substituer. Pour cela, on écrit :
CONST PI = 3.14159265458 ' PI est une constante dont la valeur est 3.14159265458
La déclaration d'une variable doit toujours se faire avant sa première référence. Pour calculer la surface d'un cercle vous devez donc définir PI avant son premier appel :
CONST PI = 3.14159265458 ' Définition de PI
CLS
PRINT "La surface d'un cercle d'un rayon de 5 est "; PI * 5 ^ 2
' Remarquez l'utilisation du point virgule et de  l'accent circonflexe pour 
' le carré
Le résultat sera :
La surface d'un cercle d'un rayon de 5 est 78.5398163645


Voir les commentaires pour QBasic - Les constantes
 06 juillet 2008 | Version 4.0.0 | © 2001 - 2007