fork download
  1. with ADA.Text_IO, ADA.Integer_Text_IO,ADA.Float_Text_IO;
  2. Use ADA.Text_IO, ADA.Integer_Text_IO,ADA.Float_Text_IO;
  3.  
  4. Procedure test Is
  5.  
  6. x : INTEGER :=10 ;
  7. my_char : Character ; -- Variable declaration for all types
  8. my_float : Float :=1.5 ;
  9.  
  10. Begin
  11. put(" MahindraSatyam");
  12. new_line;
  13. put(" MahindraSatyam");
  14. new_line;
  15. put(" The value of xis ");
  16. put(x,20);
  17. new_line;
  18. put(" The value of xis ");
  19. put(x,2);
  20. x := INTEGER'SIZE;
  21. put(" value of x:");
  22. put(x,2);
  23.  
  24. new_line;
  25. Put(LONG_DOUBLE'SIZE);
  26. Put(LONG_DOUBLE'FIRST);
  27. Put("to")
  28. put(LONG_DOUBLE'LAST);
  29.  
  30. new_line;
  31. Put(LONG_LONG_FLOAT'SIZE);
  32.  
  33. new_line;
  34. Put(LONG_FLOAT'SIZE);
  35.  
  36. new_line;
  37. Put(FLOAT'SIZE);
  38.  
  39.  
  40. End test;
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
gnatgcc -c -pipe -O2 prog.adb
prog.adb:4:11: warning: file name does not match unit name, should be "test.adb"
prog.adb:25:05: "LONG_DOUBLE" is undefined (more references follow)
prog.adb:27:10: missing ";"
gnatmake: "prog.adb" compilation error
stdout
Standard output is empty