NicoIRIS
Messages postés33Date d'inscriptionmardi 18 avril 2006StatutMembreDernière intervention 1 décembre 2009
-
16 mai 2008 à 16:15
NicoIRIS
Messages postés33Date d'inscriptionmardi 18 avril 2006StatutMembreDernière intervention 1 décembre 2009
-
19 mai 2008 à 07:50
Bonjour,
Je me suis mis au delphi il y a environ une semaine. je me trouve devant un problème de compréhension du code suivant :
If ((reponse=#15) Or (LeftStr(reponse, 1)=#$15)
Or (reponse=#6#$15))
Then......
end;
je souhaiterai savoir ce que signifie "reponse=#6#$15"
Guillemouze
Messages postés991Date d'inscriptionsamedi 25 octobre 2003StatutMembreDernière intervention29 août 20136 16 mai 2008 à 18:08
#15 represente un Char correspondant au code ascii 15
$6 represente le chiffre hexadecimal 6
donc je pense que #$6 represente le char correspondant au code ascii 6 (en hexa)
f0xi
Messages postés4205Date d'inscriptionsamedi 16 octobre 2004StatutModérateurDernière intervention12 mars 202235 17 mai 2008 à 06:34
If --> si
((reponse=#15) --> reponse est egal a SI
Or --> ou
(LeftStr(reponse, 1)=#$15) --> reponse est egal a NAK
Or --> ou
(reponse=#6#$15)) --> reponse est egal a ACK+NAK
Then --> alors faire
end --> fin
'A' > caractere (char) ou chaine (string) "A"
#65 > caractere (char) "A"
#$41 > caractere (char) "A" en hexa
#$1B > caractere (char) ESCAPE en hexa
#$0D#$0A > retour a la ligne (string) (CR+LF) en hexa
#13#10 > retour a la ligne (string) (CR+LF) en decimal
$41 > nombre hexadecimal (65 en decimal)
65 > nombre entier
65.0 > nombre réel (flottant)
'65' > chaine (string) ou il est ecrit 65 (#54#53 ou #$36#$35)