Guest User

Untitled

a guest
Jun 29th, 2018
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ada 0.45 KB | None | 0 0
  1. generic
  2.    -- defines maximum depth of tree
  3.    type Node_Level is (<>);
  4. package Tree is
  5.  
  6.    -- it's a binary tree. for now.
  7.    type Tree_Direction is (Left, Right);
  8.  
  9.    type Direction_Array is array (Node_Level range <>) of Tree_Direction;
  10.  
  11.    type Path_To_Node (Max : Node_Level) is record
  12.       Directions : Direction_Array (Node_Level'First .. Max);
  13.    end record;
  14.    
  15.    -- .. somewhere here, the actual Tree structure is defined
  16. end Tree;
Add Comment
Please, Sign In to add comment