61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
-- Output Ada code corresponding to the value of the dictionary.
-- Note that Prefix is the actual base indentation, while Half_Indent
-- is added beyond Prefix before values continued on another line.
-- Frist_Prefix is used instead of Prefix on the first line.
-- All the defaults value are what was used to generate the constant
-- in Natools.Smaz.Original.
function Remove_Element
(Dict : in Dictionary;
Index : in Ada.Streams.Stream_Element)
return Dictionary
with Pre => Index <= Dict.Dict_Last,
Post => Dict.Dict_Last = Remove_Element'Result.Dict_Last + 1
and then (Index = 0
or else (for all I in 0 .. Index - 1
=> Dict_Entry (Dict, I)
= Dict_Entry (Remove_Element'Result, I)))
and then (Index = Dict.Dict_Last
or else (for all I in Index .. Dict.Dict_Last - 1
=> Dict_Entry (Dict, I + 1)
= Dict_Entry (Remove_Element'Result, I)));
-- Return a new dictionary equal to Dict without element for Index
List_For_Linear_Search : String_Lists.List;
function Linear_Search (Value : String) return Natural;
-- Function and data source for inefficient but dynamic function
-- that can be used with Dictionary.Hash.
procedure Set_Dictionary_For_Map_Search (Dict : in Dictionary);
function Map_Search (Value : String) return Natural;
|