1

voici mon code
void _main(void)
{
short b=0;
OSRegisterTimer(USER_TIMER, 5*20);
while(OSTimerExpired(USER_TIMER)==FALSE);
{
b = ngetchx();
if(b==13)
{
OSFreeTimer(USER_TIMER);
return;
}
}
OSFreeTimer(USER_TIMER);
return; }


mai ce qui est bizzard c'est que quand j'appuy sur enter il ne se passe rien il attend quand meme la fin des 5seconde pk?????

2

Y'a un ; en trop après ton while. Et ngetchx() attend l'appui d'une touche, donc ça arrête la boucle.
avatar
All right. Keep doing whatever it is you think you're doing.
------------------------------------------
Besoin d'aide sur le site ? Essayez par ici :)

3

oui mai meme avec ca

void _main(void)
{
short b=0;
OSRegisterTimer(USER_TIMER, 5*20);
while(OSTimerExpired(USER_TIMER)==FALSE);
{
b=kbhit();
if(b==13)
{
OSFreeTimer(USER_TIMER);
return;
}
}
OSFreeTimer(USER_TIMER);
return;
}

c pareille pk????

4

Y'a un ; en trop après ton while.

neutral

« The biggest civil liberty of all is not to be killed by a terrorist. » (Geoff Hoon, ministre des transports anglais)

5

ok merci bon et autre truc voila mon code

void _main(void)
{
OSRegisterTimer(USER_TIMER, 5*20);
while(OSTimerExpired(USER_TIMER)==FALSE)
{
if(kbhit()==48
{
OSFreeTimer(USER_TIMER);
return;
}
}
OSFreeTimer(USER_TIMER);
return;
}

mai je voudari tester si une touche pui une autres sont appuyer commen je peut faire??

6

pffffffffffffffffff....

1° quand tu poste des source, utilise la balise [pre] ça évite d'avoir un truc non indenté illisible 2° va lire [url=http://www.ti-fr.com/?act=66&art=2]ce tutorial[/url] avant d'essayer de programmer en C, ça t'aidera bcp.
avatar
All right. Keep doing whatever it is you think you're doing.
------------------------------------------
Besoin d'aide sur le site ? Essayez par ici :)

7

Ce qu'on lui dit depuis le début ... c bien beau de lui filer des sources etc. mais c pas une aide pour plus tard !