diff --git a/README.md b/README.md index e69de29..3bc58fe 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,8 @@ + > This is the exercise we have to do for our Ada 2nd semester exam: + + + - Both Tds a r=separated by a comment with their names + - I did all of the question of exercise 2 in order + - I did the paper question of exercise 3 then the rest of the question (except the optionnal one on strings) + - the elvish sentence means "One Ring to rule them all, One Ring to find them, One Ring to bring them all, and in the darkness bind them" I thought it was totally appropriate + - the INSA logo is from the 1st semester Test :) diff --git a/TD_R_LACROIX_ENG_06-01-2020.adb b/TD_R_LACROIX_ENG_06-01-2020.adb index 9590b12..9268496 100644 --- a/TD_R_LACROIX_ENG_06-01-2020.adb +++ b/TD_R_LACROIX_ENG_06-01-2020.adb @@ -1,3 +1,5 @@ +-- shall we play a game? + with Fiche_Plongee, Capteurs, Gada.Text_IO; use Fiche_Plongee, Capteurs, Gada.Text_IO; @@ -15,10 +17,13 @@ procedure td is Counter := Counter+1; end if; end loop; - + return Counter; end Effectif_Palanquee; + +-- Wake up Neo + function Effectif_Fiche(Table: T_Fiche_Secu) return integer is I : Integer := 0; -- to go through the table @@ -36,7 +41,9 @@ procedure td is return Counter; end Effectif_Fiche; - + + -- the matrix has you + function Est_Plongee_Technique(Palanq : T_Palanq) return Boolean is I : Integer := 1; -- to go through the table Teacher : Integer := 0; -- to store the number of teachers @@ -57,7 +64,8 @@ procedure td is return (Teacher = 1 and Other = 0 and (Student > 0 and Student <5)); -- we return the value taken by the condition end Est_Plongee_Technique; - + -- follow the white rabbit + function Numero_Premiere_Technique(Fiche : T_Fiche_Secu) return Integer is I : Integer := 1; -- to go through the table Tech : Boolean := Est_Plongee_Technique(Fiche.Tab_Palanquees(I)); -- we initialize this as the very first entry of the table @@ -71,6 +79,8 @@ procedure td is return I; end Numero_Premiere_Technique; + -- the two that are one will become the one that is all + function Durees_Fiche_OK(Fiche: T_Fiche_Secu) return Boolean is I : Integer := 1; -- to go through the table Good : Boolean := True; -- if it stays good all along then it's good else it's not @@ -83,6 +93,7 @@ procedure td is return Good; end Durees_Fiche_OK; + -- Do you know Twitch Prime? function Profondeur_Max(Table: T_palanq) return Integer is I : Integer := 0; -- to go through the table @@ -99,6 +110,8 @@ procedure td is end Profondeur_Max; + --Ash nazg durbatulûk, ash nazg gimbatul, ash nazg thrakatulûk, agh burzum-ishi krimpatul + function Profondeur_Fiche_OK(Fiche: T_Fiche_Secu) return Boolean is I : Integer := 1; -- to go through the table Good : Boolean := True; -- to be returned @@ -142,7 +155,9 @@ procedure td is -- (Nord,2,32481.8) -- (Nord,1,32483.8) - + -- where we go we don't need roads + + procedure Course is Temp: Float := 0.0; -- there to store a value Rank: Integer := 0; @@ -214,6 +229,8 @@ procedure td is end loop; end loop; + + --we then print out the lines for I in 1 .. NB_Swimmer loop J := 0; while (Arrival(I) /= TableTime(J,3)) loop @@ -225,21 +242,18 @@ procedure td is end Course; - + -- It is the nature of human kind to push itself towards the horyzon, we test our limits, we face our fears, we rise to the challenge, and become something greater than ourselves, a civilization. begin Put_Line("42"); - - - - - + -- As we do not have usable numerical data I did not do numerical testes :/ + end td; - + -- -- --