fork download
  1. with Ada.Text_IO; use Ada.Text_IO;
  2.  
  3. procedure Add.adb is
  4.  
  5. X : integer := 0;
  6. Y : integer := 1;
  7.  
  8. begin
  9.  
  10.  
  11. for I in 1..3 loop
  12. for J in 1..I loop
  13. X := X + Y + J;
  14. end loop;
  15. Y := X;
  16. end loop;
  17.  
  18. return X;
  19.  
  20. end Add.adb;
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
gnatgcc -c -pipe -O2 prog.adb
prog.adb:3:14: warning: file name does not match unit name, should be "add-adb.adb"
prog.adb:3:14: file "add.ads" not found
prog.adb:18:01: procedure cannot return value (use function)
gnatmake: "prog.adb" compilation error
stdout
Standard output is empty