langs a-z
This commit is contained in:
parent
db842d013d
commit
d066446780
11389 changed files with 98361 additions and 1020 deletions
39
Task/Extend-your-language/Seed7/extend-your-language.seed7
Normal file
39
Task/Extend-your-language/Seed7/extend-your-language.seed7
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
$ include "seed7_05.s7i";
|
||||
|
||||
$ syntax expr: .if.().().then.().else1.().else2.().else3.().end.if is -> 25;
|
||||
|
||||
const proc: if (in boolean: cond1) (in boolean: cond2) then
|
||||
(in proc: statements1)
|
||||
else1
|
||||
(in proc: statements2)
|
||||
else2
|
||||
(in proc: statements3)
|
||||
else3
|
||||
(in proc: statements4)
|
||||
end if is func
|
||||
begin
|
||||
if cond1 then
|
||||
if cond2 then
|
||||
statements1;
|
||||
else
|
||||
statements2;
|
||||
end if;
|
||||
elsif cond2 then
|
||||
statements3;
|
||||
else
|
||||
statements4;
|
||||
end if;
|
||||
end func;
|
||||
|
||||
const proc: main is func
|
||||
begin
|
||||
if TRUE FALSE then
|
||||
writeln("error TRUE TRUE");
|
||||
else1
|
||||
writeln("TRUE FALSE");
|
||||
else2
|
||||
writeln("error FALSE TRUE");
|
||||
else3
|
||||
writeln("error FALSE FALSE");
|
||||
end if;
|
||||
end func;
|
||||
Loading…
Add table
Add a link
Reference in a new issue