Dim BytesTableau.b(10)
MyStr.s = "12/\34/\-20/\32/\102/\-99/\0/\-23/\65/\87"
For i = 1 To 10
BytesTableau(i) = StringField(MyStr, i, "/\") 'ici il faut que je convertis la chaine qui a été extraites en Byte et je sais pas comment m'y prendre
Next
Merci d'avance et bonne journée
Dernière modification par N00B le dim. 31/août/2014 19:19, modifié 1 fois.
Dim BytesTableau.b(10)
MyStr.s = "12/\34/\-20/\32/\102/\-99/\0/\-23/\65/\87"
For i = 1 To CountString(MyStr, "/\")
BytesTableau(i) = Val(StringField(MyStr, i, "/\"))
Debug BytesTableau(i)
Next i
;
; ON RECUPERE LE DERNIER SI PAS "/\"
;
If Right(MyStr, 2) <> "/\"
BytesTableau(i) = Val(StringField(MyStr, i, "/\"))
Debug BytesTableau(i)
EndIf
Dim BytesTableau.b(10)
MyStr.s = "12/\34/\-20/\32/\102/\-99/\0/\-23/\65/\87"
For i = 1 To CountString(MyStr, "/\")
BytesTableau(i) = Val(StringField(MyStr, i, "/\"))
Debug BytesTableau(i)
Next i
;
; ON RECUPERE LE DERNIER SI PAS "/\"
;
If Right(MyStr, 2) <> "/\"
BytesTableau(i) = Val(StringField(MyStr, i, "/\"))
Debug BytesTableau(i)
EndIf
Cordialement,
GallyHC
Je connaissais pas la fonction Val, Merci de ton aide problème résolu
pour indiquer que ton problème à été résolu, tu édites ton post de départ et tu mets dans le titre [Résolu], de cette manière tout le monde la saura.
Merci.
Microsoft Windows 10 Famille 64 bits : Carte mère : ASRock 970 Extreme3 R2.0 : Carte Graphique NVIDIA GeForce RTX 3080 : Processeur AMD FX 6300 6 cœurs 12 threads 3,50 GHz PB 6.20 LTS (x64)
Un homme doit être poli, mais il doit aussi être libre !
Dim BytesTableau.b(1)
MyStr.s = "12/\34/\-20/\32/\102/\-99/\0/\-23/\65/\87"
count.l = CountString(MyStr, "/\")
a = 0
If count > 1
ReDim BytesTableau.b(count)
For i = 1 To count + 1
Valeur$ = StringField(MyStr, i, "/\")
If valeur$ <> ""
BytesTableau(a) = Val(valeur$)
Debug BytesTableau(a)
a = a + 1
EndIf
Next i
EndIf