Historia argentina período 55-2003
** Auteur: Elodie LORRE
** Date: 10/12/09
** Objectif: Boite aux lettres electronique*******************************************************************************)
Program bal;
(*Uses generateur_id; *)
Const
TAILLE_MAX_ADRESSE =15;
TAILLE_MAX_OBJET=40;
TAILLE_MAX_CONTENU=250;CAPACITE=100;
NB_ADRESSES_MAX=10;
Type
T_Courriel =
Record
adresse_exp:string[TAILLE_MAX_ADRESSE];
adresses_dest:array[1..NB_ADRESSES_MAX] of string;
nb_dest:1..NB_ADRESSES_MAX;(*nombre de destinataires*)
objet:string[TAILLE_MAX_OBJET];
contenu:string[TAILLE_MAX_CONTENU];
ident_exp:Integer; (*identifiant de l'expediteur du message*)
ident_dest:Integer;(*identifiant du destinataire du message*)
end;
T_Bal =
Record
messages:array[1..CAPACITE] of T_Courriel;
nb_messages:Integer;
end;
(******Sous Programmes******)
(*Partie Courriel*)procedure initialiser_courriel(adresse_exp:string; adresse_dest:string; objet:
string; var courriel:T_Courriel);
var
i:Integer;
begincourriel.adresse_exp:=adresse_exp;
courriel.nb_dest:=1;
courriel.adresses_dest[1]:=adresse_dest;
courriel.objet:=objet;
courriel.contenu:='VIDE';
courriel.ident_exp:=1;
end;
procedureajouter_destinataire(var courriel:T_Courriel; adresse_dest:string);
begin
courriel.adresses_dest[(courriel.nb_dest)+1]:=adresse_dest;
courriel.nb_dest:=courriel.nb_dest+1;
end;
procedurechanger_contenu(var courriel:T_Courriel; contenu:string);
begin
courriel.contenu:=contenu;
end;
function reponse_courriel(courriel:T_courriel;adresse_exp:string;contenu:string):T_Courriel;
var
i:Integer;
reponse:T_Courriel;
begin
initialiser_courriel(adresse_exp,courriel.adresse_exp,courriel.objet,reponse);
changer_contenu(reponse,contenu);...
Regístrate para leer el documento completo.