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.  
  10. begin
  11. Put_Line("Enter the first name :");
  12. get(First_Name);
  13. Put_Line("Enter the last name :");
  14. get(Last_Name);
  15. Put_line("Enter the job:");
  16. get(Job);
  17. put_line("enter the location :");
  18. get(location);
  19.  
  20. put_line("The details are :");
  21. put(First_Name);
  22. new_line;
  23. get(Last_Name);
  24. new_line;
  25. put(Job);
  26. new_line;
  27. put(location);
  28.  
  29. end String_oprations;
  30.  
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:16:05: actual for "Item" must be a variable
gnatmake: "prog.adb" compilation error
stdout
Standard output is empty