Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,10 +0,0 @@
|
|||
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;
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
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
|
||||
);
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
Result := (case Op is
|
||||
Add => A + B,
|
||||
Subtract => A - B,
|
||||
Multiply => A * B,
|
||||
Divide => A / B
|
||||
);
|
||||
|
|
@ -1 +0,0 @@
|
|||
case Op of...
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
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;
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
case Today is
|
||||
when Monday =>
|
||||
Compute_Starting_Balance;
|
||||
when Friday =>
|
||||
Compute_Ending_Balance;
|
||||
when Tuesday .. Thursday =>
|
||||
Accumulate_Sales;
|
||||
-- ignore Saturday and Sunday
|
||||
end case;
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
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;
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
select
|
||||
accept first_entry;
|
||||
-- do something
|
||||
or accept second_entry;
|
||||
-- do something
|
||||
or terminate;
|
||||
end select;
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
select
|
||||
My_Task.Start;
|
||||
or
|
||||
delay Timeout_Period;
|
||||
end select;
|
||||
|
|
@ -1,8 +1,4 @@
|
|||
num: 2
|
||||
arturoIsAwesome: true
|
||||
|
||||
if? num=2 [
|
||||
print "yep, num is 2"
|
||||
]
|
||||
else [
|
||||
print "something went wrong..."
|
||||
]
|
||||
if arturoIsAwesome ->
|
||||
print "Yes, it is!"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
loop 1..5 'num [
|
||||
case [num]
|
||||
when? [<2] -> print [num ": it's less than 2"]
|
||||
when? [=2] -> print [num ": it's 2!"]
|
||||
when? [=3] -> print [num ": it's 3!"]
|
||||
else -> print [num ": the number is too big"]
|
||||
]
|
||||
itRains: false
|
||||
|
||||
unless itRains ->
|
||||
print "We are going for a walk!"
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
If <expression> Then
|
||||
statements
|
||||
...
|
||||
[ElseIf expression-n Then
|
||||
[elseif statements ... ]]
|
||||
...
|
||||
[Else
|
||||
[else statements]
|
||||
...
|
||||
EndIf
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
Select
|
||||
Case <expression>
|
||||
statement1
|
||||
...
|
||||
[Case
|
||||
statement2
|
||||
...]
|
||||
[Case Else
|
||||
statementN
|
||||
...]
|
||||
EndSelect
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
Switch <expression>
|
||||
Case <value> [To <value>] [,<value> [To <value>] ...]
|
||||
statement1
|
||||
...
|
||||
[Case <value> [To <value>] [,<value> [To <value>] ...]
|
||||
statement2
|
||||
...]
|
||||
[Case Else
|
||||
statementN
|
||||
...]
|
||||
EndSwitch
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
if condition-1
|
||||
imperative-statement-1
|
||||
else
|
||||
imperative-statement-2
|
||||
end-if
|
||||
|
||||
if condition-1
|
||||
if condition-a
|
||||
imperative-statement-1a
|
||||
else
|
||||
imperative-statement-1
|
||||
end-if
|
||||
else
|
||||
if condition-a
|
||||
imperative-statement-2a
|
||||
else
|
||||
imperative-statement-2
|
||||
end-if
|
||||
end-if
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
evaluate identifier-1
|
||||
when 'good'
|
||||
good-imperative-statement
|
||||
when 'bad'
|
||||
bad-imperative-statement
|
||||
when 'ugly'
|
||||
when 'awful'
|
||||
ugly-or-awful-imperative-statement
|
||||
when other
|
||||
default-imperative-statement
|
||||
end-evaluate
|
||||
|
||||
evaluate true
|
||||
when condition-1
|
||||
condition-1-imperative-statement
|
||||
when condition-2
|
||||
condition-2-imperative-statement
|
||||
when condition-3
|
||||
condition-3-imperative-statement
|
||||
when other
|
||||
default-condition-imperative-statement
|
||||
end-evaluate
|
||||
|
||||
evaluate identifier-1 also identifier-2
|
||||
when 10 also 20
|
||||
one-is-10-and-two-is-20-imperative-statement
|
||||
when 11 also 30
|
||||
one-is-11-and-two-is-30-imperative-statement
|
||||
when 20 also any
|
||||
one-is-20-and-two-is-anything-imperative-statement
|
||||
when other
|
||||
default-imperative-statement
|
||||
end-evaluate
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
# standard if
|
||||
if (condition) {
|
||||
# ...
|
||||
}
|
||||
|
||||
# if-then-else
|
||||
if (condition) {
|
||||
# ...
|
||||
} else {
|
||||
# ...
|
||||
}
|
||||
|
||||
# if-then-elseif-else
|
||||
if (condition) {
|
||||
# ...
|
||||
} elseif (condition2) {
|
||||
# ...
|
||||
} else {
|
||||
# ...
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
# standard switch
|
||||
switch ($var) {
|
||||
1 { "Value was 1" }
|
||||
2 { "Value was 2" }
|
||||
default { "Value was something else" }
|
||||
}
|
||||
|
||||
# switch with wildcard matching
|
||||
switch -Wildcard ($var) {
|
||||
"a*" { "Started with a" }
|
||||
"*x" { "Ended with x" }
|
||||
}
|
||||
|
||||
# switch with regular expression matching
|
||||
switch -Regex ($var) {
|
||||
"[aeiou]" { "Contained a consonant" }
|
||||
"(.)\1" { "Contained a character twice in a row" }
|
||||
}
|
||||
|
||||
# switch allows for scriptblocks too
|
||||
switch ($var) {
|
||||
{ $_ % 2 -eq 0 } { "Number was even" }
|
||||
{ $_ -gt 100 } { "Number was greater than 100" }
|
||||
}
|
||||
|
||||
# switch allows for handling a file
|
||||
switch -Regex -File somefile.txt {
|
||||
"\d+" { "Line started with a number" }
|
||||
"\s+" { "Line started with whitespace" }
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
If condition1 Then
|
||||
statement
|
||||
End If
|
||||
|
||||
If condition1 Then
|
||||
statement
|
||||
ElseIf condition2 Then
|
||||
statement
|
||||
...
|
||||
ElseIf conditionN Then
|
||||
statement
|
||||
Else
|
||||
statement
|
||||
End If
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
If condition Then statement
|
||||
|
||||
If condition Then statement Else statement
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
Select Case Expression
|
||||
Case Value1: statement
|
||||
Case Value2: statement
|
||||
...
|
||||
Case ValueN: statement
|
||||
Case Else: statement
|
||||
End Select
|
||||
|
||||
Select Case Expression
|
||||
Case Value1
|
||||
statements
|
||||
Case Value2
|
||||
statements
|
||||
...
|
||||
Case ValueN
|
||||
statements
|
||||
Case Else
|
||||
statements
|
||||
End Select
|
||||
Loading…
Add table
Add a link
Reference in a new issue