Data update

This commit is contained in:
Ingy döt Net 2024-03-06 22:25:12 -08:00
parent ed705008a8
commit 0df55f9f24
2196 changed files with 32999 additions and 3075 deletions

View file

@ -1,8 +1,8 @@
i = random 10
i = randint 10
if i mod 2 = 0
print i & " is divisible by 2"
print i & " is divisible by 2"
elif i mod 3 = 0
print i & " is divisible by 3"
print i & " is divisible by 3"
else
print i & " is not divisible by 2 or 3"
print i & " is not divisible by 2 or 3"
.

View file

@ -15,7 +15,7 @@ switch 0 {
...
}
given .x, .y, .z {
switch[and] .x, .y, .z {
case true: ...
# all are true
case false, _: ...

View file

@ -1,4 +1,4 @@
given .x {
switch .x {
case true:
# implicit fallthrough
case null: 0

View file

@ -1,4 +1,4 @@
given .x {
switch .x {
case true:
if .y > 100 {
fallthrough

View file

@ -1,4 +1,4 @@
given(.x, .y, .z;
true: ... ; # all are equal to true
switch(.x, .y, .z;
true: ... ; # any are equal to true
_, >= .z: ...; # .y >= .z
... ) # default

View file

@ -1,7 +1,6 @@
if test 4 -ge 6; then
echo '4 is greater than or equal to 6'
elif test 4 -lt 6; then
echo '4 is less than 6'
else
echo '4 compares not to 6'
if test 4 -ge 6
then echo '4 is greater than or equal to 6'
elif test 4 -lt 6
then echo '4 is less than 6'
else echo '4 compares not to 6'
fi