Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
2
Task/Enumerations/Ada/enumerations.adb
Normal file
2
Task/Enumerations/Ada/enumerations.adb
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
type Fruit is (apple, banana, cherry); -- No specification of the representation value;
|
||||
for Fruit use (apple => 1, banana => 2, cherry => 4); -- specification of the representation values
|
||||
19
Task/Enumerations/Pluto/enumerations.pluto
Normal file
19
Task/Enumerations/Pluto/enumerations.pluto
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
-- Without explicit values.
|
||||
-- Starts from 1.
|
||||
enum seasons begin
|
||||
winter,
|
||||
spring,
|
||||
summer,
|
||||
autumn
|
||||
end
|
||||
|
||||
print(seasons.spring)
|
||||
|
||||
-- With explicit values.
|
||||
enum numbers begin
|
||||
zero = 0,
|
||||
five = 5,
|
||||
ten = 10
|
||||
end
|
||||
|
||||
print(numbers.five)
|
||||
8
Task/Enumerations/PowerShell/enumerations-1.ps1
Normal file
8
Task/Enumerations/PowerShell/enumerations-1.ps1
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
Enum fruits {
|
||||
Apple
|
||||
Banana
|
||||
Cherry
|
||||
}
|
||||
[fruits]::Apple
|
||||
[fruits]::Apple + 1
|
||||
[fruits]::Banana + 1
|
||||
8
Task/Enumerations/PowerShell/enumerations-2.ps1
Normal file
8
Task/Enumerations/PowerShell/enumerations-2.ps1
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
Enum fruits {
|
||||
Apple = 10
|
||||
Banana = 15
|
||||
Cherry = 30
|
||||
}
|
||||
[fruits]::Apple
|
||||
[fruits]::Apple + 1
|
||||
[fruits]::Banana + 1
|
||||
10
Task/Enumerations/Rebol/enumerations.rebol
Normal file
10
Task/Enumerations/Rebol/enumerations.rebol
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
*Protocol-type: enum [
|
||||
CHANGE_CIPHER_SPEC: 20
|
||||
ALERT: 21
|
||||
HANDSHAKE: 22
|
||||
APPLICATION: 23
|
||||
] 'TLS-protocol-type
|
||||
*Protocol-type/APPLICATION ;== 23
|
||||
*Protocol-type/name 23 ;== 'APPLICATION
|
||||
*Protocol-type/assert 23 ;== #(true)
|
||||
*Protocol-type/assert 24 ;** Script error: invalid value 24 for: TLS-protocol-type
|
||||
3
Task/Enumerations/Uiua/enumerations.uiua
Normal file
3
Task/Enumerations/Uiua/enumerations.uiua
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
Days # Built-in
|
||||
&p⊸⊡1 # -> "Monday"
|
||||
&p˜⨂□"Sunday" # -> 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue