program gar; (* DEFINITION DE LA PAGE GRAPHIQUE GENERALE *) BEGIN PREF iiuwgraph BLOCK (* PROCEDURE PAUSE POUR ATTENTE AU CLAVIER *) UNIT PAUSE:procedure; VAR touche:char; BEGIN call color(12); call move(100,320); call outstring(" Appuyer sur ENTREE pour passer a la suite"); read(touche); END PAUSE; (* PROCEDURE D ATTENTE PAR BOUCLE ACTIVE *) UNIT attend:procedure(tmp:integer); VAR i:integer; BEGIN for i:=0 to tmp * 10 do od; END attend; (* PROCEDURE D ATTENTE AVEC COMPTEUR POUR LA SORTIE DE L APPLICATION *) UNIT attend_sortie:procedure; VAR x,y,i,k,j:integer; BEGIN j:=9; x:=300; y:=200; for k:=1 to 10 do call color(11); call move(300,200); call HASCII(j+48); for i:=0 to 4000 do od; call color(0); call rectangle_double(x,y-1,x+25,y+9); call rectangle_double(x+1,y,x+24,y+8); call rectangle_double(x+4,y+2,x+22,y+6); call rectangle_double(x+5,y+3,x+21,y+5); j:=j-1; od; END attend_sortie; (* PAGE DE PRESENTATION GENERALE DE DEBUT *) UNIT presentation:iiuwgraph procedure; BEGIN (* creation d'une bordure*) call border(13); (*creation d'un cadre pour la fenetre*) call move(10,10); call draw(10,340); call draw( 628,340); call draw(628,10); call draw(10,10); call color(2); (*contenu du titre*) call move(180,80); call outstring("IMPLEMENTATION D'UNE SIMULATION"); call move(260,100); call outstring("DE GARE SNCF"); call color(12); call move(250,180); call outstring("PROJET NUMERO 2"); call color(14); call move(130,280); call outstring("PAR : Mr AC'H Fabrice et CLAVERIE Jean-Fran‡ois"); call move(130,300); call outstring(" Mr GOUGEON Jean-Yves et Mr RICHARD Jerome"); (*appel de la procedure pause pour passer a la suite*) call PAUSE; (*appel de l'effacage de l'ecran*) call cls; END presentation; (* FONCTION DEFINISSANT UNE MESSAGE-BOX *) (* ARGUMENTS : Text_message, Longueur_message, Couleur_text, Coordonnees *) UNIT msgbox : function(message:string,long,couleur,x,y:integer):boolean; VAR centrage:integer,reponse:boolean, h,v,b,i:integer; BEGIN PREF mouse BLOCK BEGIN (* si texte petit met longueur a 6 par defaut *) if(long<6) then long:=6; fi; call move(x,y); call color(couleur); call rectangle_double(x,y,x+(long * 9 + 20)+2,y + 52); (* centrage du texte dans le rectangle *) centrage:=((long * 9+20) div 2) - ((long div 2)*8); for i:=(y + 3) to (y+49) do call color(7); call move(x+3,i); call draw(x+(long * 9) +19 ,i); od; call color(couleur); call move(x+centrage,y+5); call outstring(message); call color(14); (* definition des boutons OUI et NON *) call rectangle(x+centrage+1,y+29,x+centrage+26,y+41); call move(x+centrage+2,y+32); call outstring("OUI"); call rectangle(x+(long * 9) -centrage +1,y+29,x+(long * 9) -centrage +26,y+41); call move(x+(long * 9) - centrage +2,y+32); call outstring("NON"); call showcursor; do call getpress(0,h,v,b,gauche,droit,centre); if(gauche) then if((v> y + 29)and(v> y + 32)) then if((h>(x+centrage+1))and(h<(x+centrage+26))) then reponse:=true; gauche:=false; exit; else if((h>(x+(long * 9)-centrage +1))and(h<(x+(long * 9)-centrage +26))) then reponse:=false;gauche:=false; exit; fi; fi; fi; fi; od; call hidecursor; result:=reponse; END; END msgbox; (* PROCEDURE DE TRACAGE DE RECTANGLE SIMPLE *) UNIT rectangle:iiuwgraph procedure(x_h,y_h,x_b,y_b:integer); BEGIN call move(x_h,y_h); call draw(x_b,y_h); call draw(x_b,y_b); call draw(x_h,y_b); call draw(x_h,y_h); END rectangle; (* PROCEDURE DE TRACAGE DE RECTANGLE DOUBLE AVEC RECTANGLE SIMPLE *) UNIT rectangle_double : iiuwgraph procedure(x_h,y_h,x_b,y_b:integer); BEGIN call rectangle(x_h,y_h,x_b,y_b); call rectangle(x_h+2,y_h+2,x_b-2,y_b-2); END rectangle_double; (* PROCEDURE DE CHOIX DES PARAMETRES DE LA SIMULATION *) (* RENVOIE LA DUREE ET LE TYPE DE SIMULATION *) UNIT param : iiuwgraph procedure(inout duree,typ :integer); VAR haut,bas:boolean,h,v,b:integer; BEGIN PREF mouse BLOCK BEGIN (*initialisation *) haut:=true; typ:=0; duree:=0; h:=0;v:=0;b:=0; bas:=true; call color(14); call move(100,40); call outstring(" CHER UTILISATEUR CHOISISSEZ UNE DUREE PARMI :"); call rectangle_double(100,60,550,100); (* fait les bares verticales *) call move(150,62); call draw(150,98); call move(200,62); call draw(200,98); call move(250,62); call draw(250,98); call move(300,62); call draw(300,98); call move(350,62); call draw(350,98); call move(400,62); call draw(400,98); call move(450,62); call draw(450,98); call move(500,62); call draw(500,98); (* fin bare verticales *) (*texte*) call color(15); call move(105,78);call outstring("1 min"); call move(155,78);call outstring("2 min"); call move(205,78);call outstring("3 min"); call move(255,78);call outstring("4 min"); call move(305,78);call outstring("5 min"); call move(355,78);call outstring("6 min"); call move(405,78);call outstring("7 min"); call move(455,78);call outstring("8 min"); call move(505,78);call outstring("9 min"); (*fin texte*) call color(14); call move(100,150); call outstring(" ET UN TYPE DE SIMULATION ( densite des VOYAGEURs ) :"); call rectangle_double(100,170,550,210); (* bares verticales *) call move(250,172); call draw(250,208); call move(400,172); call draw(400,208); (* fin bare verticales *) (*texte*) call color(15); call move(121,184);call outstring(" Nuit"); call move(275,184);call outstring(" Jour"); call move(425,184);call outstring(" Dense"); (*fin texte*) (* definition de la souris *) call showcursor; while(haut or bas) do call getpress(0,h,v,b,gauche,droit,centre); if (gauche) then if(h>100 and h<550) then call HIDECURSOR; if(haut) then if(v>60 and v<100) then if(h>100 and h<150) then duree:=10; call color(0); call move(105,78); call outstring("1 min"); call color(12); call move(105,78); call outstring("1 min"); else if(h>150 and h<200) then duree:=20; call color(0); call move(155,78); call outstring("2 min"); call color(12); call move(155,78); call outstring("2 min"); else if(h>200 and h<250) then duree:=30; call color(0); call move(205,78); call outstring("3 min"); call color(12); call move(205,78); call outstring("3 min"); else if(h>250 and h<300) then duree:=40; call color(0); call move(255,78); call outstring("4 min"); call color(12); call move(255,78); call outstring("4 min"); else if(h>300 and h<350) then duree:=50; call color(0); call move(305,78); call outstring("5 min"); call color(12); call move(305,78); call outstring("5 min"); else if(h>350 and h<400) then duree:=60; call color(0); call move(355,78); call outstring("6 min"); call color(12); call move(355,78); call outstring("6 min"); else if(h>400 and h<450) then duree:=70; call color(0); call move(405,78); call outstring("7 min"); call color(12); call move(405,78); call outstring("7 min"); else if(h>450 and h<500) then duree:=80; call color(0); call move(455,78); call outstring("8 min"); call color(12); call move(455,78); call outstring("8 min"); else if (h>500 and h<550) then duree:=90; call color(0); call move(505,78); call outstring("9 min"); call color(12); call move(505,78); call outstring("9 min"); fi;fi;fi;fi;fi;fi;fi;fi;fi; haut:=false; fi; fi; if (bas) then if(v>170 and v<210) then if (h>100 and h<250) then typ:=1; call color(0); call move(121,184); call outstring(" Nuit"); call color(12); call move(121,184); call outstring(" Nuit"); else if (h>250 and h<400) then typ:=2; call color(0); call move(275,184); call outstring(" Jour"); call color(12); call move(275,184); call outstring(" Jour"); else if (h>400 and h<550) then typ:=3; call color(0); call move(425,184); call outstring(" Dense"); call color(12); call move(425,184); call outstring(" Dense"); fi;fi;fi; bas:=false; fi; fi; call SHOWCURSOR; fi; gauche:=false; fi; od; call color(10); call move(100,300); call outstring(" La duree sera de : ");call color(15); case duree when 10:call outstring("1 min"); when 20:call outstring("2 min"); when 30:call outstring("3 min"); when 40:call outstring("4 min"); when 50:call outstring("5 min"); when 60:call outstring("6 min"); when 70:call outstring("7 min"); when 80:call outstring("8 min"); when 90:call outstring("9 min"); esac; call color(10); call outstring(" et le type sera : ");call color(15); case typ when 1:call outstring("Nuit"); when 2:call outstring("Jour"); when 3:call outstring("Dense"); esac; call PAUSE; call hidecursor; call cls; END; END param; (* PROCEDURE D ECRITURE D UN ENTIER A L ECRAN *) (* PARAMETRES TEMPS:REAL et COORDONNEES *) UNIT ecrit_chiffre : procedure(TIME:real,x,y:integer); VAR wtime :integer; BEGIN call move(x,y); call HASCII(0); wtime:=entier(TIME); (* temps <1000 *); if(wtime>=100) then call HASCII(wtime div 100+48); wtime:=wtime mod 100; else call HASCII(0); fi; call HASCII(wtime div 10 + 48); call HASCII(wtime mod 10 + 48); END ecrit_chiffre; (* PROCEDURE D EFFACEMENT DU CHIFFRE ECRIT *) UNIT EFFACE_chiffre : procedure(x,y:integer); BEGIN call color(0); call rectangle_double(x,y-1,x+25,y+9); call rectangle_double(x+1,y,x+24,y+8); call rectangle_double(x+4,y+2,x+22,y+6); call rectangle_double(x+5,y+3,x+21,y+5); END EFFACE_chiffre; (* PROCEDURE DE TRACAGE DES VOIES *) UNIT voie:iiuwgraph procedure; BEGIN call color(9); call rectangle_double(4,170,635,176); call rectangle_double(5,171,634,175); call move(5,171); call color(14); call outstring("QUAI 1"); call color(9); call rectangle(4,177,635,195); call color(10); call rectangle_double(4,220,635,226); call rectangle_double(5,221,634,225); call move(5,221); call color(14); call outstring("QUAI 2"); call color(10); call rectangle(4,227,635,245); call color(11); call rectangle_double(4,270,635,276); call rectangle_double(5,271,634,275); call move(5,271); call color(14); call outstring("QUAI 3"); call color(11); call rectangle(4,277,635,295); call color(12); call rectangle_double(4,320,635,326); call rectangle_double(5,321,634,325); call move(5,321); call color(14); call outstring("QUAI 4"); call color(12); call rectangle(4,327,635,345); END voie; (* PROCEDURE DE TRACAGE DES CAISSES *) UNIT caisse : iiuwgraph procedure; BEGIN call color(15); (*caisse1*) call rectangle_double(10,3,80,23); (*caisse2*) call rectangle_double(10,26,80,43); (*caisse3*) call rectangle_double(10,47,80,65); (*caisse4*) call rectangle_double(10,68,80,86); (*texte caisse*) call color(9); call move(14,9); call outstring("Caisse 1"); call move(14,31); call color(10); call outstring("Caisse 2"); call move(14,52); call color(11); call outstring("Caisse 3"); call move(14,73); call color(12); call outstring("Caisse 4"); END caisse; (* PROCEDURE D ECRITURE DES MESSAGES D ARRIVEE DES TRAIN DANS TABLEAU *) UNIT mes_train :procedure(num:integer); BEGIN case num when 1: call color(9); call move(435,9); call outstring("le train quai 1 arrive"); when 2: call color(10); call move(435,31); call outstring("le train quai 2 arrive"); when 3: call color(11); call move(435,52); call outstring("le train quai 3 arrive"); when 4: call color(12); call move(435,73); call outstring("le train quai 4 arrive"); esac; END mes_train; UNIT mes_train_rep :procedure(num:integer); BEGIN case num when 1: call color(9); call move(435,9); call outstring("le train quai 1 REPART"); when 2: call color(10); call move(435,31); call outstring("le train quai 2 REPART"); when 3: call color(11); call move(435,52); call outstring("le train quai 3 REPART"); when 4: call color(12); call move(435,73); call outstring("le train quai 4 REPART"); esac; END mes_train_rep; UNIT eff_mestrn:procedure(num:integer); BEGIN call color(0); case num when 1: call move(435,9); call outstring("le train quai 1 arrive"); when 2: call move(435,31); call outstring("le train quai 2 arrive"); when 3: call move(435,52); call outstring("le train quai 3 arrive"); when 4: call move(435,73); call outstring("le train quai 4 arrive"); esac; END eff_mestrn; UNIT eff_mestrn_rep:procedure(num:integer); BEGIN call color(0); case num when 1: call move(435,9); call outstring("le train quai 1 REPART"); when 2: call move(435,31); call outstring("le train quai 2 REPART"); when 3: call move(435,52); call outstring("le train quai 3 REPART"); when 4: call move(435,73); call outstring("le train quai 4 REPART"); esac; END eff_mestrn_rep; (* PROCEDURE DE TRACAGE DES TRAINS *) UNIT DESSINE_TRAIN : procedure(num,deplacement :integer); VAR wdepl,wbdepl:integer; BEGIN wdepl:=deplacement+5; wbdepl:=deplacement+100; if wdepl >=632 then wdepl:=632; fi; if wbdepl>=632 then wbdepl:=632; fi; case num when 1: call color(9); call rectangle_double(wdepl,179,wbdepl,193); when 2: call color(10); call rectangle_double(wdepl,229,wbdepl,243); when 3: call color(11); call rectangle_double(wdepl,279,wbdepl,293); when 4: call color(12); call rectangle_double(wdepl,329,wbdepl,343); esac; END DESSINE_TRAIN; UNIT EFFACE_TRAIN : iiuwgraph procedure(num,deplacement :integer); VAR wdepl,wbdepl :integer; BEGIN wdepl:=deplacement+5; wbdepl:=deplacement+100; if wdepl >=632 then wdepl:=632; fi; if wbdepl>=632 then wbdepl:=632 fi; call color(0); case num when 1: call rectangle_double(wdepl,179,wbdepl,193); when 2: call rectangle_double(wdepl,229,wbdepl,243); when 3: call rectangle_double(wdepl,279,wbdepl,293); when 4: call rectangle_double(wdepl,329,wbdepl,343); esac; END EFFACE_TRAIN; UNIT arrive_TRAIN:procedure(num:integer); VAR indice,temp:integer; BEGIN call mes_train(num); for indice:=0 to 100 do call DESSINE_TRAIN(num,indice); call EFFACE_TRAIN(num,indice); od; call DESSINE_TRAIN(num,indice); END arrive_TRAIN; UNIT REPART_TRAIN:procedure(num:integer); VAR indice,temp:integer; BEGIN call eff_mestrn(num); call mes_train_rep(num); for indice:=100 to 636 do call DESSINE_TRAIN(num,indice); call EFFACE_TRAIN(num,indice); od; call eff_mestrn_rep(num); END REPART_TRAIN; (* PROCEDURE DE TRACAGE DU TABLEAU DES ARRIVEES *) UNIT tableau : iiuwgraph procedure; BEGIN call color(15); call rectangle(350,3,635,86); call rectangle(410,5,633,19); call rectangle(410,28,633,42); call rectangle(410,49,633,63); call rectangle(410,70,633,84); (*texte tableau*) call color(9); call move(354,9); call outstring("Quai 1"); call move(354,31); call color(10); call outstring("Quai 2"); call move(354,52); call color(11); call outstring("Quai 3"); call move(354,73); call color(12); call outstring("Quai 4"); END tableau; (* PROCEDURE DE TRACAGE DES VOYAGEURS *) UNIT VOYAGEUR:iiuwgraph procedure(x,y:integer); BEGIN call move(x,y); call draw(x,y+6); call draw(x-2,y+10); call move(x,y+6); call draw(x+2,y+10); call move(x-2,y+2); call draw(x+2,y+2); call move(x-2,y+2); call draw(x-4,y+4); call move(x+2,y+2); call draw(x+4,y+4) END; UNIT affiche_VOYAGEUR:iiuwgraph procedure(x,y:integer); BEGIN call color(14); call VOYAGEUR(x,y); END affiche_VOYAGEUR; UNIT EFFACE_VOYAGEUR:iiuwgraph procedure(x,y:integer); BEGIN call color(0); call VOYAGEUR(x,y); END EFFACE_VOYAGEUR; (* PROCEDURE D AFFICHAGE DE LA GARE *) UNIT gar:iiuwgraph procedure; BEGIN call color(15); call attend(400); call rectangle_double(0,0,639,349); call caisse; call voie; call tableau; call composteuse; END gar; (* PROCEDURE DE TRACAGE DU COMPOSTEUR *) UNIT composteuse : iiuwgraph procedure; BEGIN call color(7); call move(3,125); call draw(460,125); call move(3,126); call draw(460,126); call rectangle(500,125,633,150); call move(528,135); call outstring("COMPOSTEUR"); END composteuse; UNIT PRIORITYQUEUE: CLASS; (* HEAP AS BINARY LINKED TREE WITH FATHER LINK*) UNIT QUEUEHEAD: CLASS; (* HEAP ACCESING MODULE *) VAR LAST,ROOT:NODE; UNIT MIN: FUNCTION: ELEM; BEGIN IF ROOT=/= NONE THEN RESULT:=ROOT.EL FI; END MIN; UNIT INSERT: PROCEDURE(R:ELEM); (* INSERTION INTO HEAP *) VAR X,Z:NODE; BEGIN X:= R.LAB; IF LAST=NONE THEN ROOT:=X; ROOT.LEFT,ROOT.RIGHT,LAST:=ROOT ELSE IF LAST.NS=0 THEN LAST.NS:=1; Z:=LAST.LEFT; LAST.LEFT:=X; X.UP:=LAST; X.LEFT:=Z; Z.RIGHT:=X; ELSE LAST.NS:=2; Z:=LAST.RIGHT; LAST.RIGHT:=X; X.RIGHT:=Z; X.UP:=LAST; Z.LEFT:=X; LAST.LEFT.RIGHT:=X; X.LEFT:=LAST.LEFT; LAST:=Z; FI FI; CALL CORRECT(R,FALSE) END INSERT; UNIT DELETE: PROCEDURE(R: ELEM); VAR X,Y,Z:NODE; BEGIN X:=R.LAB; Z:=LAST.LEFT; IF LAST.NS =0 THEN Y:= Z.UP; Y.RIGHT:= LAST; LAST.LEFT:=Y; LAST:=Y; ELSE Y:= Z.LEFT; Y.RIGHT:= LAST; LAST.LEFT:= Y; FI; Z.EL.LAB:=X; X.EL:= Z.EL; LAST.NS:= LAST.NS-1; R.LAB:=Z; Z.EL:=R; IF X.LESS(X.UP) THEN CALL CORRECT(X.EL,FALSE) ELSE CALL CORRECT(X.EL,TRUE) FI; END DELETE; UNIT CORRECT: PROCEDURE(R:ELEM,DOWN:BOOLEAN); (* CORRECTION OF THE HEAP WITH STRUCTURE BROKEN BY R *) VAR X,Z:NODE,T:ELEM,FIN,LOG:BOOLEAN; BEGIN Z:=R.LAB; IF DOWN THEN WHILE NOT FIN DO IF Z.NS =0 THEN FIN:=TRUE ELSE IF Z.NS=1 THEN X:=Z.LEFT ELSE IF Z.LEFT.LESS(Z.RIGHT) THEN X:=Z.LEFT ELSE X:=Z.RIGHT FI; FI; IF Z.LESS(X) THEN FIN:=TRUE ELSE T:=X.EL; X.EL:=Z.EL; Z.EL:=T; Z.EL.LAB:=Z; X.EL.LAB:=X FI; FI; Z:=X; OD ELSE X:=Z.UP; IF X=NONE THEN LOG:=TRUE ELSE LOG:=X.LESS(Z); FI; WHILE NOT LOG DO T:=Z.EL; Z.EL:=X.EL; X.EL:=T; X.EL.LAB:=X; Z.EL.LAB:=Z; Z:=X; X:=Z.UP; IF X=NONE THEN LOG:=TRUE ELSE LOG:=X.LESS(Z); FI; OD FI; END CORRECT; END QUEUEHEAD; UNIT NODE: CLASS (EL:ELEM); (* ELEMENT OF THE HEAP *) VAR LEFT,RIGHT,UP: NODE, NS:INTEGER; UNIT LESS: FUNCTION(X:NODE): BOOLEAN; BEGIN IF X= NONE THEN RESULT:=FALSE ELSE RESULT:=EL.LESS(X.EL) FI; END LESS; END NODE; UNIT ELEM: CLASS(PRIOR:REAL); (* PREFIX OF INFORMATION TO BE STORED IN NODE *) VAR LAB: NODE; UNIT VIRTUAL LESS: FUNCTION(X:ELEM):BOOLEAN; BEGIN IF X=NONE THEN RESULT:= FALSE ELSE RESULT:= PRIOR< X.PRIOR FI; END LESS; BEGIN LAB:= NEW NODE(THIS ELEM); END ELEM; END PRIORITYQUEUE; UNIT SIMULATION: PRIORITYQUEUE CLASS; (* THE LANGUAGE FOR SIMULATION PURPOSES *) VAR CURR: SIMPROCESS, (*ACTIVE PROCESS *) PQ:QUEUEHEAD, (* THE TIME AXIS *) MAINPR: MAINPROGRAM; UNIT SIMPROCESS: COROUTINE; (* USER PROCESS PREFIX *) VAR EVENT, (* ACTIVATION MOMENT NOTICE *) EVENTAUX: EVENTNOTICE, (* THIS IS FOR AVOIDING MANY NEW CALLS AS AN RESULT OF *) (* SUBSEQUENT PASSIVATIONS AND ACTIVATIONS *) FINISH: BOOLEAN; UNIT IDLE: FUNCTION: BOOLEAN; BEGIN RESULT:= EVENT= NONE; END IDLE; UNIT TERMINATED: FUNCTION :BOOLEAN; BEGIN RESULT:= FINISH; END TERMINATED; UNIT EVTIME: FUNCTION: REAL; (* TIME OF ACTIVATION *) BEGIN IF IDLE THEN CALL ERROR1; FI; RESULT:= EVENT.EVENTTIME; END EVTIME; UNIT ERROR1:PROCEDURE; BEGIN ATTACH(MAIN); call outstring(" AN ATTEMPT TO ACCESS AN IDLE PROCESS TIME"); END ERROR1; UNIT ERROR2:PROCEDURE; BEGIN ATTACH(MAIN); call outstring(" AN ATTEMPT TO ACCESS A TERMINATED PROCESS TIME"); END ERROR2; BEGIN RETURN; INNER; FINISH:=TRUE; CALL PASSIVATE; CALL ERROR2; END SIMPROCESS; UNIT EVENTNOTICE: ELEM CLASS; (* A PROCESS ACTIVATION NOTICE TO BE PLACED ONTO THE TIME AXIS PQ *) VAR EVENTTIME: REAL, PROC: SIMPROCESS; UNIT VIRTUAL LESS: FUNCTION(X: EVENTNOTICE):BOOLEAN; (* OVERWRITE THE FORMER VERSION CONSIDERING EVENTTIME *) BEGIN IF X=NONE THEN RESULT:= FALSE ELSE RESULT:= EVENTTIME< X.EVENTTIME OR (EVENTTIME=X.EVENTTIME AND PRIOR< X.PRIOR); FI; END LESS; END EVENTNOTICE; UNIT MAINPROGRAM: SIMPROCESS CLASS; (* IMPLEMENTING MASTER PROGRAM AS A PROCESS *) BEGIN DO ATTACH(MAIN) OD; END MAINPROGRAM; UNIT TIME:FUNCTION:REAL; (* CURRENT VALUE OF SIMULATION TIME *) BEGIN RESULT:=CURRENT.EVTIME END TIME; UNIT CURRENT: FUNCTION: SIMPROCESS; (* THE FIRST PROCESS ON THE TIME AXIS *) BEGIN RESULT:=CURR; END CURRENT; UNIT SCHEDULE: PROCEDURE(P:SIMPROCESS,T:REAL); BEGIN IF T