fork download
  1. with Ada.Text_IO;
  2. use Ada.Text_IO;
  3.  
  4. procedure String_oprations is
  5. First_Name : string(1..30);
  6. Last_Name : string(1..30);
  7. Job : constant STRING := "Computer Programmer";
  8. location : string(1..15) ;
  9. int:natural;
  10.  
  11. begin
  12. Put_Line("Enter the first name :");
  13. get(First_Name,int);
  14. Put_Line("Enter the last name :");
  15. get(Last_Name,int);
  16. put_line("enter the location :");
  17. get(location,int);
  18.  
  19. put_line("The details are :");
  20. put(First_Name);
  21. new_line;
  22. get(Last_Name);
  23. new_line;
  24. put(Job);
  25. new_line;
  26. put(location);
  27.  
  28. end String_oprations;
  29.  
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 "string_oprations.adb"
prog.adb:13:01: no candidate interpretations match the actuals:
prog.adb:13:01: too many arguments in call to "get"
prog.adb:13:05: expected private type "Ada.Text_Io.File_Type"
prog.adb:13:05: found type "Standard.String"
prog.adb:13:05:   ==> in call to "Get" at a-textio.ads:241
prog.adb:13:05:   ==> in call to "Get" at a-textio.ads:207
prog.adb:15:01: no candidate interpretations match the actuals:
prog.adb:15:01: too many arguments in call to "get"
prog.adb:15:05: expected private type "Ada.Text_Io.File_Type"
prog.adb:15:05: found type "Standard.String"
prog.adb:15:05:   ==> in call to "Get" at a-textio.ads:241
prog.adb:15:05:   ==> in call to "Get" at a-textio.ads:207
prog.adb:17:01: no candidate interpretations match the actuals:
prog.adb:17:01: too many arguments in call to "get"
prog.adb:17:05: expected private type "Ada.Text_Io.File_Type"
prog.adb:17:05: found type "Standard.String"
prog.adb:17:05:   ==> in call to "Get" at a-textio.ads:241
prog.adb:17:05:   ==> in call to "Get" at a-textio.ads:207
gnatmake: "prog.adb" compilation error
stdout
Standard output is empty