Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,10 @@
type Restricted is range 1..10;
My_Var : Restricted;
if My_Var = 5 then
-- do something
elsif My_Var > 5 then
-- do something
else
-- do something
end if;

View file

@ -0,0 +1,10 @@
case Today is
when Saturday | Sunday =>
null; -- don't do anything, if Today is Saturday or Sunday
when Monday =>
Compute_Starting_Balance;
when Friday =>
Compute_Ending_Balance;
when Tuesday .. Thursday =>
Accumulate_Sales;
end case;

View file

@ -0,0 +1,7 @@
select
accept first_entry;
-- do something
or accept second_entry;
-- do something
or terminate;
end select;

View file

@ -0,0 +1,5 @@
select
My_Task.Start;
or
delay Timeout_Period;
end select;

View file

@ -0,0 +1,13 @@
type Operation is (Add, Subtract, Multiply, Divide);
Op : Operation;
Result : Integer;
-- we assume that A and B are inputs.
Result := (if Op = Add then
A + B
elsif Op = Subtract then
A - B
elsif Op = Multiply then
A * B
elsif Op = Divide then
A / B
);

View file

@ -0,0 +1 @@
Operation

View file

@ -0,0 +1 @@
Op

View file

@ -0,0 +1 @@
Result

View file

@ -0,0 +1,6 @@
Result := (case Op is
Add => A + B,
Subtract => A - B,
Multiply => A * B,
Divide => A / B
);

View file

@ -0,0 +1 @@
case Op of...

View file

@ -0,0 +1,13 @@
type Days is (Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday);
Today : Days;
case Today is
when Saturday | Sunday =>
null;
when Monday =>
Compute_Starting_Balance;
when Friday =>
Compute_Ending_Balance;
when others =>
Accumulate_Sales;
end case;

View file

@ -0,0 +1,9 @@
case Today is
when Monday =>
Compute_Starting_Balance;
when Friday =>
Compute_Ending_Balance;
when Tuesday .. Thursday =>
Accumulate_Sales;
-- ignore Saturday and Sunday
end case;