added another great bunch o spaces
This commit is contained in:
parent
6f8525518a
commit
a99c753ae4
1 changed files with 6 additions and 6 deletions
|
@ -219,10 +219,10 @@ procedure td is
|
||||||
while not Sorted loop
|
while not Sorted loop
|
||||||
|
|
||||||
for I in 1 .. NB_Swimmer-1 loop -- for every value if it is greater than the next one we swop them
|
for I in 1 .. NB_Swimmer-1 loop -- for every value if it is greater than the next one we swop them
|
||||||
if Arrival(I) > Arrival(I+1) then
|
if Arrival(I) > Arrival(I + 1) then
|
||||||
Temp := Arrival(I); -- there to store a value
|
Temp := Arrival(I); -- there to store a value
|
||||||
Arrival(I) := Arrival(I+1);
|
Arrival(I) := Arrival(I + 1);
|
||||||
Arrival(I+1) := Temp;
|
Arrival(I + 1) := Temp;
|
||||||
Temp := 0.0; --reset
|
Temp := 0.0; --reset
|
||||||
end if;
|
end if;
|
||||||
end loop;
|
end loop;
|
||||||
|
@ -231,7 +231,7 @@ procedure td is
|
||||||
--here we check for if it's sorted (if not we give it another go)
|
--here we check for if it's sorted (if not we give it another go)
|
||||||
Sorted := True; --it starts true
|
Sorted := True; --it starts true
|
||||||
for I in 1 .. NB_Swimmer-1 loop
|
for I in 1 .. NB_Swimmer-1 loop
|
||||||
if Arrival(I) > Arrival(I+1) then -- if a value is greater than the next one (as it's not supposed to be)
|
if Arrival(I) > Arrival(I + 1) then -- if a value is greater than the next one (as it's not supposed to be)
|
||||||
Sorted := False; -- we set the sorted value to false
|
Sorted := False; -- we set the sorted value to false
|
||||||
end if;
|
end if;
|
||||||
end loop;
|
end loop;
|
||||||
|
@ -241,8 +241,8 @@ procedure td is
|
||||||
--we then print out the lines
|
--we then print out the lines
|
||||||
for I in 1 .. NB_Swimmer loop
|
for I in 1 .. NB_Swimmer loop
|
||||||
J := 0;
|
J := 0;
|
||||||
while (Arrival(I) /= TableTime(J,3)) loop
|
while (Arrival(I) /= TableTime(J, 3)) loop
|
||||||
J := J+1;
|
J := J + 1;
|
||||||
end loop;
|
end loop;
|
||||||
|
|
||||||
Put_Line("Swimmer " & Integer'Image(J) & " arrived in place " & Integer'Image(I) & " with a time of " & Float'Image(Arrival(I)-TDepart));
|
Put_Line("Swimmer " & Integer'Image(J) & " arrived in place " & Integer'Image(I) & " with a time of " & Float'Image(Arrival(I)-TDepart));
|
||||||
|
|
Loading…
Reference in a new issue