1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| Fonction decoupage_chaine ( ip_reseau : Chaîne ) : Entier
Variable longeur_chaine , i , j , compteur_nombres : Entier
Variable tableau_bloc_octet : Chaîne [ 12 ]
Variable caractere_courant : Chaîne
Début
| j <- 0
| longeur_chaine <- LgChaîne ( ip_reseau )
| Pour i <- 1 à longeur_chaine Faire
| | caractere_courant <- SousChaîne ( ip_reseau , i , 1 )
| | Si caractere_courant <> "."
| | | j <- j + 1
| | FinSi
| | Si caractere_courant = "."
| | | tableau_bloc_octet [ i ] <- SousChaîne ( ip_reseau , j , i )
| | | Afficher ( tableau_bloc_octet [ i ] )
| | FinSi
| |
| FinPour
Fin |
Partager