Mathc complexes/Fichiers c : test01a

Un livre de Wikilivres.

Installer et compiler ce fichier dans votre répertoire de travail.

test01a.c
/* ------------------------------------ */
/*  Save as :   test01a.c               */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
int main(void)
{
	clrscrn();
	printf(" Hello word !\n\n");		
	stop();
	
    do{
		
  	   clrscrn();          
	   printf(" Hello word ! into the do{}while\n\n");	
	
    }while(stop_w());

    return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */


La commande stop(); arrête l'excution du programme.
La commande stop_w() fait la même chose dans une boucle while. (attention pas de virgule)


Exemple de sortie écran :
 -----------------------
 Hello word !

 Press return to continue. 


 -----------------------
 Hello word ! into the do{}while


 Press return to continue
 Press X      to stop    x