Traduction code visual basic en algorithme
bonjour, dans l'objectif d'utiliser la communication avec les ports séries, j'ai besoin de traduire se code en algorithme pour que je puisse le traduire vers une autre langage :
le code est :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| Dim Tampon As String
Tampon = ""
Instant = Now
Do
TimeOut = DateDiff("s", Instant, Now)
Loop Until MSComm1.InBufferCount >= 50 Or TimeOut > 10
Lecture = MSComm1.Input:
If TimeOut > 10 Then
MsgBox "Problème de delai :" + Chr$(13) + _
" Vérifiez que l'indicateur est bien " & UCase(Proto) & _
" et bien branché", vbExclamation: End
End If
70:
i = i + 1
Stabilite = Mid$(Lecture, i, 1)
If i > Len(Lecture) Then GoTo 90:
If Stabilite <> "P" Then GoTo 70
valeur = Mid$(Lecture, i + 1, 6)
Poids = valeur
Poids = valeur: GoTo 90 'Stop
'********************* S T 3 *******************
90
Text1 = Val(Poids)
EcritDansFichierIni "Affichage", "Poids ", Text1, App.Path & "\Poids.ini" |
// Fin de code
je ne compère pas la notion de 70 et 90 ; quand le code passe à les exécuter .
Merci d'avance pour votre collaboration ...