Update all new Tasks
This commit is contained in:
parent
00a190b0a6
commit
91df62d461
5697 changed files with 93386 additions and 804 deletions
19
Task/Integer-overflow/Seed7/integer-overflow.seed7
Normal file
19
Task/Integer-overflow/Seed7/integer-overflow.seed7
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
$ include "seed7_05.s7i";
|
||||
|
||||
const proc: writeResult (ref func integer: expression) is func
|
||||
begin
|
||||
block
|
||||
writeln(expression);
|
||||
exception
|
||||
catch OVERFLOW_ERROR: writeln("OVERFLOW_ERROR");
|
||||
end block;
|
||||
end func;
|
||||
|
||||
const proc: main is func
|
||||
begin
|
||||
writeResult(-(-9223372036854775807-1));
|
||||
writeResult(5000000000000000000+5000000000000000000);
|
||||
writeResult(-9223372036854775807 - 9223372036854775807);
|
||||
writeResult(3037000500 * 3037000500);
|
||||
writeResult((-9223372036854775807-1) div -1);
|
||||
end func;
|
||||
Loading…
Add table
Add a link
Reference in a new issue