Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
3
Task/Call-a-function/Seed7/call-a-function-1.seed7
Normal file
3
Task/Call-a-function/Seed7/call-a-function-1.seed7
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
env := environment; # Call a function that requires no arguments.
|
||||
env := environment(); # Alternative possibility to call of a function with no arguments.
|
||||
cmp := compare(i, j); # Call a function with a fixed number of arguments.
|
||||
2
Task/Call-a-function/Seed7/call-a-function-2.seed7
Normal file
2
Task/Call-a-function/Seed7/call-a-function-2.seed7
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
write(aFile, "asdf"); # Variant of write with a parameter to specify a file.
|
||||
write("asdf"); # Variant of write which writes to the file OUT.
|
||||
13
Task/Call-a-function/Seed7/call-a-function-3.seed7
Normal file
13
Task/Call-a-function/Seed7/call-a-function-3.seed7
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
const func integer: sum (in array integer: intElems) is func
|
||||
result
|
||||
var integer: sum is 0;
|
||||
local
|
||||
var integer: element is 0;
|
||||
begin
|
||||
for element range intElems do
|
||||
sum +:= element;
|
||||
end for;
|
||||
end func;
|
||||
|
||||
s := sum([] (1, 2, 3)); # Use an aggregate to generate an array.
|
||||
t := sum([] (2, 3, 5, 7));
|
||||
1
Task/Call-a-function/Seed7/call-a-function-4.seed7
Normal file
1
Task/Call-a-function/Seed7/call-a-function-4.seed7
Normal file
|
|
@ -0,0 +1 @@
|
|||
write("Nr: " <& num); # Use operators to concatenate arguments.
|
||||
1
Task/Call-a-function/Seed7/call-a-function-5.seed7
Normal file
1
Task/Call-a-function/Seed7/call-a-function-5.seed7
Normal file
|
|
@ -0,0 +1 @@
|
|||
ignore(getln(IN)); # Using a function in statement context (ignore the result).
|
||||
1
Task/Call-a-function/Seed7/call-a-function-6.seed7
Normal file
1
Task/Call-a-function/Seed7/call-a-function-6.seed7
Normal file
|
|
@ -0,0 +1 @@
|
|||
seq := doMap([](1, 2, 4, 6, 10, 12, 16), x, succ(x));
|
||||
Loading…
Add table
Add a link
Reference in a new issue