Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- with Ada.Containers.Multiway_Trees;
- with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
- procedure tree is
- type t_directory is record
- id : Natural;
- name : Unbounded_String;
- end record;
- package p_directory_tree is new Ada.Containers.Multiway_Trees (t_directory);
- type t_directory_tree is access p_directory_tree.Tree;
- function get_parent (tree : t_directory_tree; id : Natural) return Natural is
- begin
- return 7;
- end get_parent;
- foo : t_directory_tree;
- bar : Natural;
- begin
- foo := new p_directory_tree.Tree;
- bar := foo.get_parent (7);
- end tree;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement