text stringlengths 0 234 |
|---|
procedure message (X_Start, Y_Start : in Integer; S : in String) is |
begin |
Set_Graphical_Mode(Off); |
for Y in 1..11 loop |
for X in 1..55 loop |
-- om inte första eller inte sista raden |
if Y = 1 OR Y = 11 then |
if X mod 2 = 0 then |
Put(ASCII.ESC & message_frame_color1); |
else |
Put(ASCII.ESC & message_frame_color2); |
end if; |
else |
if X = 1 OR X = 55 then |
if Y mod 2 = 0 then |
Put(ASCII.ESC & message_frame_color1); |
else |
Put(ASCII.ESC & message_frame_color2); |
end if; |
else |
if Y mod 2 = 0 then |
Put(ASCII.ESC & message_frame_color2); |
else |
Put(ASCII.ESC & message_frame_color1); |
end if; |
end if; |
end if; |
goto_xy((X_Start - 2 + X), (Y_Start - 1 + Y)); |
Put(' '); |
end loop; |
end loop; |
-- White inner frame |
for X in 1..51 loop |
for Y in 1..9 loop |
Put(ASCII.ESC & "[48;5;15m"); |
goto_xy((X_Start + X), (Y_Start + Y)); |
Put(' '); |
end loop; |
end loop; |
goto_xy(X_Start + 3, Y_Start + 5); |
Set_Foreground_Colour(Black); |
Put(S); |
end message; |
--------------------------------------------------------------------------------------------- |
--------------------------------------------------------------------------------------------- |
--------------------------------------------------------------------------------------------- |
Function Definition: procedure Test is |
Function Body: procedure Test_TJa is |
Own_Protocoll, Other_Protocoll: Protocoll_Type; |
Selected_Place : Integer; |
begin |
Reset_Colours; -- Standard colours is supposed to be black on white ... |
Clear_Window; |
Set_Graphical_Mode(On); |
background; |
protocoll_background(125, 4); |
logo_background(24, 4); |
message(38, 18, "Hejsan"); |
-- Draw a rectangle on screen ... |
--Set_Graphical_Mode(On); |
for I in 1..15 loop |
case I is |
when 1 => Own_Protocoll(I) := 1; |
when 2 => Own_Protocoll(I) := 2; |
when 3 => Own_Protocoll(I) := 3; |
when 4 => Own_Protocoll(I) := 4; |
when 5 => Own_Protocoll(I) := 5; |
when 6 => Own_Protocoll(I) := -1; |
when 7 => Own_Protocoll(I) := -1; |
when 8 => Own_Protocoll(I) := -1; |
when 9 => Own_Protocoll(I) := -1; |
when 10 => Own_Protocoll(I) := -1; |
when 11 => Own_Protocoll(I) := -1; |
when 12 => Own_Protocoll(I) := 15; |
when 13 => Own_Protocoll(I) := -1; |
when 14 => Own_Protocoll(I) := 15; |
when 15 => Own_Protocoll(I) := -1; |
when others => null; |
-- Own_Protocoll(I) := I; |
end case; |
end loop; |
for I in 1..15 loop |
Other_Protocoll(I) := I; |
end loop; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.