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

24 lines
505 B
Ada

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;