Définition...
Opérateurs...
Exemple...
Traduction...
/***************************************************************/
Interface IFlux Defaut Final
/* Objet : Definition de l'interface pour les flux. */
/***************************************************************/
Prive :
Mode : ModeOuvertureFlux Lecture Public;
NomFlux : Caractere Lecture Public;
FinDeFlux : Booleen Lecture Public;
Public :
Constructeur();
Procedure Lire(B : Booleen Sortie);
Fonction Lire(B : Binaire Sortie, Nombre : Nul Ou Entier) Retourner Nul Ou Entier;
Fonction Lire(C : Caractere Sortie, Nombre : Nul Ou Entier) Retourner Nul Ou Entier;
Procedure Lire(E : Entier Sortie);
Procedure Lire(R : Reel Sortie);
Fonction LireUneLigne(C : Caractere Sortie, Nombre : Nul Ou Entier) Retourner Nul Ou Entier;
Fonction LireUnMot(C : Caractere Sortie, Nombre : Nul Ou Entier) Retourner Nul Ou Entier;
Procedure Ecrire(B : Nul Ou Booleen);
Procedure Ecrire(C : Nul Ou Binaire);
Procedure Ecrire(C : Nul Ou Caractere);
Procedure Ecrire(E : Nul Ou Entier);
Procedure Ecrire(R : Nul Ou Reel);
Procedure Fermer();
Fonction Optimiser(Invariant) LirePageDeCode() Retourner PagesDeCodesSupportees;
Procedure ChangerPageDeCode(P : PagesDeCodesSupportees);
Fin Interface
L'interface IFlux possède un constructeur implicite l'initialisant à flux fermé.
Si une erreur survient lors de l'ouverture, les exceptions OuvertureEcriture ou OuvertureLecture sont envoyées.
Variable
FichesPatients : IFlux;
/* 'FichesPatients' est une variable de type IFlux. Elle est toujours renseignée. */
FichesProspects : Nul Ou IFlux;
/* 'FichesProspects' est une variable de type fichier. Elle n'est pas toujours renseignee. */
Principal
Debut
...
Si FichesPatients==FichesProspects Alors
/* Egalité entre deux flux. */
...
Fin Si
Si FichesPatients!=FichesProspects Alors
/* Inégalité entre deux flux. */
...
Fin Si
Fin Principal
IStrom | IStream | I小河 | IFlujo | - | - | - | - |