Prob Transtipage

Mylvain Messages postés 4 Date d'inscription vendredi 23 avril 2004 Statut Membre Dernière intervention 6 mai 2004 - 6 mai 2004 à 17:32
Mylvain Messages postés 4 Date d'inscription vendredi 23 avril 2004 Statut Membre Dernière intervention 6 mai 2004 - 6 mai 2004 à 21:14
Salut j'ai un prob avec ce code :

DM.TClt.First();
repeat
Total:=DM.TCltCLT_ID.AsInteger;
DM.TClt.Next();

until DM.TClt.Eof;
FichCltEnrTotLabel.Caption := String(Total);

Je suis le super débutant (vous l'aurez peut-être deviné en voyant ce code) alors soyez pas trop moqueur lol. Je dois avoir un prob au niveau du transtipage de mon Integer Total vers String...
Plz Help , merci d'avance

2 réponses

cs_Delphiprog Messages postés 4297 Date d'inscription samedi 19 janvier 2002 Statut Membre Dernière intervention 9 janvier 2013 32
6 mai 2004 à 21:12
Evite les transtypages trop violents comme :
String(Total);
Pascal propose des fonctions plus "soft" pour réaliser une conversion comme celle-ci :
FichCltEnrTotLabel.Caption := IntToStr (Total);

(IntToStr = Entier vers chaine)
May Delphi be with you
0
Mylvain Messages postés 4 Date d'inscription vendredi 23 avril 2004 Statut Membre Dernière intervention 6 mai 2004
6 mai 2004 à 21:14
Oui merci du conseil ça marche mieux ainsi
:big) Merci bcp ;)
0
Rejoignez-nous