From 24781de8bedb3bf4d12d7ec1d0307842e59a3f94 Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Tue, 10 Dec 2024 20:47:53 +1300 Subject: Binding for filename.H added --- test/compare.adb | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 test/compare.adb (limited to 'test/compare.adb') diff --git a/test/compare.adb b/test/compare.adb new file mode 100644 index 0000000..2273414 --- /dev/null +++ b/test/compare.adb @@ -0,0 +1,45 @@ + + +-- Programmed by Jedidiah Barber +-- Released into the public domain + + +with + + Ada.Text_IO, + FLTK.Filenames; + + +procedure Compare is + + package TIO renames Ada.Text_IO; + package FFN renames FLTK.Filenames; + + Aardvark : String := "aardvark"; + Zebra : String := "Zebra"; + Two : String := "item_2"; + Ten : String := "item_10"; + Cap_Ten : String := "Item_10"; + +begin + + TIO.Put_Line ("Alphabetic comparison of " & Aardvark & " and " & Zebra & ": " & + FFN.Comparison'Image (FFN.Alpha_Sort (Aardvark, Zebra))); + TIO.Put_Line ("Case insensitive comparison of " & Aardvark & " and " & Zebra & ": " & + FFN.Comparison'Image (FFN.Case_Alpha_Sort (Aardvark, Zebra))); + TIO.New_Line; + + TIO.Put_Line ("Alphabetic comparison of " & Two & " and " & Ten & ": " & + FFN.Comparison'Image (FFN.Alpha_Sort (Two, Ten))); + TIO.Put_Line ("Numeric comparison of " & Two & " and " & Ten & ": " & + FFN.Comparison'Image (FFN.Numeric_Sort (Two, Ten))); + TIO.New_Line; + + TIO.Put_Line ("Numeric comparison of " & Two & " and " & Cap_Ten & ": " & + FFN.Comparison'Image (FFN.Numeric_Sort (Two, Cap_Ten))); + TIO.Put_Line ("Case insensitive comparison of " & Two & " and " & Cap_Ten & ": " & + FFN.Comparison'Image (FFN.Case_Numeric_Sort (Two, Cap_Ten))); + +end Compare; + + -- cgit