text stringlengths 0 234 |
|---|
return 2 * Rolls(I); |
end if; |
end loop; |
return 0; |
Function Definition: function Triss(Rolls: Arr) |
Function Body: return Integer is |
begin |
for I in 1..3 loop |
if Rolls(I) = Rolls(I+1) and Rolls(I) = Rolls(I+2) then |
return 3 * Rolls(I); |
end if; |
end loop; |
return 0; |
Function Definition: procedure goto_prev is |
Function Body: begin |
-- Clear screen |
for X in 1..17 loop |
Goto_XY(Coord_Config_X, Coord_Config_Y + X * 2); |
Put(ASCII.ESC & bg_color); |
Put(" "); |
Goto_XY(1000,1000); |
end loop; |
if Curr_Index_Selected = 1 then |
Curr_Index_Selected := 16; |
end if; |
loop |
Curr_Index_Selected := Curr_Index_Selected - 1; |
if avail_points(Curr_Index_Selected) >= 0 then |
exit; |
end if; |
end loop; |
if Curr_Index_Selected > 6 then |
Goto_XY(Coord_Config_X, Coord_Config_Y + Curr_Index_Selected * 2 + 4); |
else |
Goto_XY(Coord_Config_X, Coord_Config_Y + Curr_Index_Selected * 2); |
end if; |
Put("->"); |
Goto_XY(1000,1000); |
end goto_prev; |
procedure goto_next is |
begin |
-- Clear screen |
for X in 1..17 loop |
Goto_XY(Coord_Config_X, Coord_Config_Y + X * 2); |
Put(ASCII.ESC & bg_color); |
Put(" "); |
Goto_XY(1000,1000); |
end loop; |
if Curr_Index_Selected = 15 then |
Curr_Index_Selected := 0; |
end if; |
loop |
Curr_Index_Selected := Curr_Index_Selected + 1; |
if avail_points(Curr_Index_Selected) >= 0 then |
exit; |
end if; |
if Curr_Index_Selected = 15 then |
Curr_Index_Selected := 0; |
end if; |
end loop; |
if Curr_Index_Selected > 6 then |
Goto_XY(Coord_Config_X, Coord_Config_Y + Curr_Index_Selected * 2 + 4); |
else |
Goto_XY(Coord_Config_X, Coord_Config_Y + Curr_Index_Selected * 2); |
end if; |
Put("->"); |
Goto_XY(1000,1000); |
end goto_next; |
begin |
Put("a1"); -- DEBUG |
-- Build array of available slots |
for x in 1..15 loop |
if avail_points(x) >= 0 then |
temp_arraysize := temp_arraysize + 1; |
end if; |
end loop; |
New_Line; Put("a2"); -- DEBUG |
declare |
test_array : dynamic_array(0..temp_arraysize); |
begin |
for x in 1..15 loop |
if avail_points(x) >= 0 then |
test_array(temp_array_index) := temp_array_index * 2; |
temp_array_index := temp_array_index + 1; |
end if; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.