Page 10 - PowerPoint 演示文稿
P. 10
Analyser les modules et déduire leurs algorithmes
Traduire la solution en pascal
Analyse du pp
Analyse du programme principal
Nom = Produits
Résultat = Proc affichef (fprod)
Fprod = PROC remplitf(t,n)
Fin produits
TDNT Globaux TDO globaux
NT O T/N R
Informations = Enregistrement fprod tfprod Fichier de
Code, design : chaîne remplitf procédure produits
Qte : entier affichef procédure
Pvu, PVt : réel
Fin informations
fprod = fichier de informations
Analyse de la procédure remplitf
DEF PROC remplitf (var fprod : tfprod)
Résultat = fprod
Fprod = [proc creation (fprod)]
Répéter
Avec dp faire TDOL
Code = donnée O T/N R
Desig= donnée Dp informations
Qte = donnée rep caractère
Puv = donnée
Ptv donnée
Fin Avec
Ecrire(fprod,dp)
Répéter
Rep = donnée
Jusqu’à majus(rep) dans [« O », « N »]
Jusqu’Majus(rep) = « N »
FIN remplitf
Analyse de la procédure creation
DEF PROC creation(var fprod : tfprod)
Résultat = fprod_ouvert
Fprod_ouvert= Associer (fprod, « C:\4SI2\produits.dat » )
Recréer(fprod)
FIN creation
Page 10