diff options
Diffstat (limited to 'src/packrat.adb')
-rw-r--r-- | src/packrat.adb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/packrat.adb b/src/packrat.adb new file mode 100644 index 0000000..8c1c463 --- /dev/null +++ b/src/packrat.adb @@ -0,0 +1,28 @@ + + +package body Packrat is + + + function Array_Less_Than + (Left, Right : in Array_Type) + return Boolean + is + Left_Index : Positive := Left'First; + Right_Index : Positive := Right'First; + begin + while Left_Index <= Left'Last and Right_Index <= Right'Last loop + if Left (Left_Index) < Right (Right_Index) then + return True; + elsif Left (Left_Index) /= Right (Right_Index) then + return False; + end if; + Left_Index := Left_Index + 1; + Right_Index := Right_Index + 1; + end loop; + return Left'Length < Right'Length; + end Array_Less_Than; + + +end Packrat; + + |