code-examples/2015/2015_03/ada/algorytmy/persons.ads

24 lines
505 B
Ada
Raw Normal View History

2025-03-09 10:58:55 +00:00
with Ada.Strings.Unbounded;
with Ada.Text_IO;
package persons is
package su renames Ada.Strings.Unbounded;
package to renames Ada.Text_IO;
type person is tagged private;
function get_name(This: person) return su.Unbounded_String;
procedure set_name(This: out person; val: su.Unbounded_String);
procedure greet(This: person);
private
type person is tagged
record
name: su.Unbounded_String;
years: Integer;
end record;
end persons;