Date

Résolu
arbomont Messages postés 57 Date d'inscription mardi 21 septembre 2004 Statut Membre Dernière intervention 3 février 2014 - 7 déc. 2004 à 00:42
Gobillot Messages postés 3140 Date d'inscription vendredi 14 mai 2004 Statut Membre Dernière intervention 11 mars 2019 - 7 déc. 2004 à 03:15
je veux stocker dans une variable, un nombre qui soit systematiquement sur 2 octet.

ExempleSi la variable lis 12, variable 12 mais si variable lis 7 alors variable 07, et pas 7.

Comment peut on faire ?

Merci

JC

2 réponses

Gobillot Messages postés 3140 Date d'inscription vendredi 14 mai 2004 Statut Membre Dernière intervention 11 mars 2019 34
7 déc. 2004 à 03:15
variable = Format$(variable, "00")

Daniel
3
kiboumz Messages postés 120 Date d'inscription mercredi 17 septembre 2003 Statut Membre Dernière intervention 18 mai 2007
7 déc. 2004 à 01:37
Je crois que tu pourrais faire ainsi, mais je ne suis pas sur que cela fonctionne:

if variable <= 9 then

variable = 0 & variable

end if

Voila
a+
0
Rejoignez-nous