Programme de gestion des fichiers

brsmed Messages postés 9 Date d'inscription lundi 9 janvier 2012 Statut Membre Dernière intervention 6 septembre 2017 - 5 nov. 2013 à 12:05
brsmed Messages postés 9 Date d'inscription lundi 9 janvier 2012 Statut Membre Dernière intervention 6 septembre 2017 - 6 sept. 2017 à 15:54
Cette discussion concerne un article du site. Pour la consulter dans son contexte d'origine, cliquez sur le lien ci-dessous.

https://codes-sources.commentcamarche.net/source/100212-programme-de-gestion-des-fichiers

brsmed Messages postés 9 Date d'inscription lundi 9 janvier 2012 Statut Membre Dernière intervention 6 septembre 2017
6 sept. 2017 à 15:54
Non c'est juste pour sépare les procédures.
Whismeril Messages postés 19022 Date d'inscription mardi 11 mars 2003 Statut Contributeur Dernière intervention 17 avril 2024 656
2 mars 2017 à 09:04
Bonjour, oui c'est une bizarrerie de Comment Ca Marche, les commentaires sont "détachés" de l'article, source ou truc qu'ils commentent.
Et quand CS a été racheté par CCM, cette bizarrerie nous a été appliquée.

En haut du fil de commentaires, il y a un carde vert ou il est écrit
Cette discussion concerne un article du site. Pour la consulter dans son contexte d'origine, cliquez sur le lien ci-dessous.
en vert aussi, et en dessous le lien vers la source.
bokar18 Messages postés 17 Date d'inscription vendredi 17 février 2012 Statut Membre Dernière intervention 2 mars 2017
2 mars 2017 à 03:07
Je ne vois plus la source.
jahavpcp Messages postés 1 Date d'inscription lundi 22 janvier 2007 Statut Membre Dernière intervention 21 août 2014
21 août 2014 à 13:07
OK merci bubois77. C'est magnifique votre programme :)
bamba29 Messages postés 7 Date d'inscription mercredi 18 juin 2014 Statut Membre Dernière intervention 24 juillet 2014
18 juin 2014 à 22:44
SALUT pour la ligne 43 vous avez oublié l'appostrophe
Ok merci dubois77 pour intervention c très gentil.
dubois77 Messages postés 675 Date d'inscription jeudi 17 avril 2008 Statut Membre Dernière intervention 19 février 2019 14
14 nov. 2013 à 12:58
Bonjour brsmed
Il n'y a aucun problème
Comme le code que tu as posté était difficilement "lisable" vu la non indentation, je me suis juste permis de faire ce petit travail à ta place
Si cela te chagrine tu peux tout à fait ignorer cette intervention, mais pour tes postages futurs, tu risques de voir fleurir des reproches vu le réglement en vigueur sur ce site
Cordialement
c'est quoi votre problème?
dubois77 Messages postés 675 Date d'inscription jeudi 17 avril 2008 Statut Membre Dernière intervention 19 février 2019 14
Modifié par jordane45 le 19/06/2014 à 11:08
Pour ceux qui veulent vérifier cette source, une version indentée :

PROGRAM D?ETUDIANT; 
{
REPUBLIQUE ALGERIENNE DEMOCRATIQUE ET POPULAIRE
MENISTRE D'ENSEIGNEMENT SUPERIEURE ET DE LA RECHERCHE SCIENTIFIQUE
UNIVERSITE AMMAR TLAIDJI LAGHOUAT
DEPARTEMENT INFORMATIQUE ET MATHEMATIQUE
Programme realise par BOURAS Mohamed et BENADDOUN Elhadj
Encadrer par Mm TAABA
Premiere annee Mathematique et Informatique
Saison universitair 2009/2010
}
uses crt;

label g,h;

const n=1;

type
date=record
joure:1..31;
mois:1..12;
annee:00..99;
end;
anuver=record
ane1:integer;
ane2:integer;
end;
identite=record
num:integer;
nom:string[30];
prenom:string[30];
d_ness:date;
l_ness:string[30];
niv:string[30];
filer:string[30];
ane_univ:anuver;
end;
var
ch:char;
c_etud:file of identite;
etud:identite;
n2,n1,j,i,k:integer;
{+--------------------------------------------------------}
procedure affichage;
begin
gotoxy(13,03);
writeln('----------------------------------------------------- ?);
for j:=4 to 22 do
begin
gotoxy(13,J); writeln('-');
gotoxy(68,j); writeln('-');
end;
gotoxy(52,04); writeln(' ÄÄÄÄÄÄÄÄÄÄÄÄ¿');
for k:=5 to 10do
begin
gotoxy(52,k); writeln('³');
gotoxy(65,k); writeln('³');
end;
gotoxy(52,11); writeln('ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ');
gotoxy(57,07); writeln('PHOTO');
gotoxy(16,05); writeln(' MINISTRE D''ENSEGNEMENT SUPERIEURE');
gotoxy(16,6); writeln(' ET DE LA RECHERCHE SCIENTIFIQUE ');
gotoxy(16,7); writeln(' UNIVERSITE DE LAGHOUAT');
gotoxy(16,8); writeln(' PRISEDENCE DE L''UNIVERSITE');
gotoxy(23,11); writeln(' CARTE D''ETUDIANT');
gotoxy(17,13); writeln('NUMERO:');
gotoxy(17,15); writeln('NOM:');
gotoxy(37,15); writeln('PRENOM:');
gotoxy(17,17); writeln('D NESSANCE:');
gotoxy(47,17); writeln('A'':');
gotoxy(17,19); writeln('NIVEAU:');
gotoxy(47,19); writeln('FILIERE:');
gotoxy(17,21); writeln('L''ANNEE UNIVERSITAIR:');
gotoxy(47,21); writeln('/');
gotoxy(13,23); writeln('------------------------------------------------- ');
end;
{----------------------------------------------------}
procedure creation;
begin
with etud do
begin
gotoxy(26,13); readln(num);
gotoxy(23,15); readln(nom);
gotoxy(47,15); readln(prenom);
with d_ness do
begin
gotoxy(32,17); readln(joure);
gotoxy(36,17); readln(mois);
gotoxy(40,17); readln(annee);
end;
gotoxy(52,17); readln(l_ness);
gotoxy(26,19); readln(niv);
gotoxy(57,19); readln(filer);
with ane_univ do
begin
gotoxy(42,21); readln(ane1);
gotoxy(49,21); readln(ane2);
end;
end;
end;
{---------------------------------------------------------}
procedure sesir;
begin
rewrite(c_etud);
for i:=1 to n do
begin
affichage;
creation;
write(c_etud,etud);
clrscr;
end;
close(c_etud);
clrscr;
end;
{--------------------------------------------}
procedure consult;
begin
reset(c_etud);
gotoxy(20,08);
writeln('donnez le numero de l''enregistrement:');
gotoxy(58,08);
read(i);
if i>filesize(c_etud)then
begin
clrscr;
gotoxy(20,08); writeln('la valeur depasse la taille du fichier?');
gotoxy(28,10); writeln('<appyer sur une touch>');
gotoxy(52,10);
ch:=readkey;
end
else
begin
clrscr;
affichage;
seek(c_etud,i-1);
read(c_etud,etud);
with etud do
begin
gotoxy(26,13); writeln(num);
gotoxy(23,15); writeln(nom);
gotoxy(47,15); writeln(prenom);
with d_ness do
begin
gotoxy(32,17); writeln(joure);
gotoxy(36,17); writeln(mois);
gotoxy(40,17); writeln(annee);
end;
gotoxy(52,17); writeln(l_ness);
gotoxy(26,19); writeln(niv);
gotoxy(59,19); writeln(filer);
with ane_univ do
begin
gotoxy(42,21); writeln(ane1);
gotoxy(49,21); writeln(ane2);
end;
end;
ch:=readkey;
close(c_etud);
readln;
end;
end;
{-------------------------------------------------------------}
procedure affichage1;
begin
reset(c_etud);
with etud do
for i:=1 to filesize(c_etud) do
begin
read(c_etud,etud);
affichage;
gotoxy(26,13); writeln(num);
gotoxy(23,15); writeln(nom);
gotoxy(47,15); writeln(prenom);
with d_ness do
begin
gotoxy(32,17); writeln(joure);
gotoxy(36,17); writeln(mois);
gotoxy(40,17); writeln(annee);
end;
gotoxy(52,17); writeln(l_ness);
gotoxy(26,19); writeln(niv);
gotoxy(57,19); writeln(filer);
with ane_univ do
begin
gotoxy(42,21); writeln(ane1);
gotoxy(49,21); writeln(ane2);
end;
ch:=readkey;
clrscr;
end;
close(c_etud);
end;
{------------------------------------------------------------------}
procedure ajoute;
begin
reset(c_etud);
gotoxy(17,8); write('donner le nombre des etudients ? ajouter: ');
gotoxy(59,8);
read(n1);
clrscr;
affichage;
seek(c_etud,filesize(c_etud));
for i:= 1 to n1 do
begin
affichage;
creation;
write(c_etud,etud);
clrscr;
end;
close(c_etud);
clrscr;
end;
{------------------------------------------------------------------}
begin {programme principale}
assign(c_etud,'crtetd');
g:clrscr;
gotoxy(13,03); writeln('--------------------------------------------------------------');
for j:=4 to 22 do
begin
gotoxy(13,J); writeln('-');
gotoxy(70,j); writeln('-');
end;
gotoxy(18,7); writeln('--------------CARTE D''ETUDIANT--------------');
gotoxy(20,9); writeln('1:CREATION');
gotoxy(20,11); writeln('2:AFFICHAGE');
gotoxy(20,13); writeln('3:CONSULTATION');
gotoxy(20,15); writeln('4:AJOUT');
gotoxy(20,17); writeln('5:QUITTER');
gotoxy(20,19); writeln('DONNEZ VOTRE CHOIX : ');
gotoxy(13,23); writeln('--------------------------------------------------------------------');
gotoxy(41,19);
readln(n2);
clrscr;
case n2 of
1:begin
sesir;
goto g;
end;
2:begin
affichage1;
goto g;
end;
3:begin
consult;
goto g
end;
4:begin
ajoute;
goto g
end;
5:goto h;
end;
h:end.
Rejoignez-nous