A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
20
Task/Extend-your-language/Icon/extend-your-language.icon
Normal file
20
Task/Extend-your-language/Icon/extend-your-language.icon
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
procedure main(A)
|
||||
if2 { (A[1] = A[2]), (A[3] = A[4]), # Use PDCO with all three else clauses
|
||||
write("1: both true"),
|
||||
write("1: only first true"),
|
||||
write("1: only second true"),
|
||||
write("1: neither true")
|
||||
}
|
||||
if2 { (A[1] = A[2]), (A[3] = A[4]), # Use same PDCO with only one else clause
|
||||
write("2: both true"),
|
||||
write("2: only first true"),
|
||||
}
|
||||
end
|
||||
|
||||
procedure if2(A) # The double-conditional PDCO
|
||||
suspend if @A[1] then
|
||||
if @A[2] then |@A[3] # Run-err if missing 'then' clause
|
||||
else @\A[4] # (all else clauses are optional)
|
||||
else if @A[2] then |@\A[5]
|
||||
else |@\A[6]
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue