Bonjour,
J'implémente un tableau pour un type privé et un mot en tant que tableau borné.
Source Ada :
package Chaos is
pragma Pure (Chaos);
subtype Word_Size_Range is Positive range 1..64;
end Chaos;
Source Ada :
generic
type Digit_Type is private;
type Digit_Array is array (Positive range <>) of Digit_Type;
with function ">" (Left, Right : in Digit_Array) return Boolean;
package Chaos.Lexical is
end Chaos.Lexical;
Source Ada :
with Chaos.Lexical;
use Chaos;
package Chaos.Wide_Text is
new Chaos.Lexical (Wide_Character,
Wide_String,
">");
Source Ada :
with Chaos.Lexical;
generic
Word_Size : Positive;
with package Lexic is new Chaos.Lexical(<>);
package Chaos.Word is
subtype Word_Type is Lexic.Digit_Array(1..Word_Size);
end Chaos.Word;
Source Ada :
with Chaos;
with Chaos.Wide_Text;
with Chaos.Word;
use Chaos;
package/procedure ... is
package Wide_Text_Word is
new Chaos.Word(Word_Size_Range'Last,
Chaos.Wide_Text);
Je voudrais connaître la validité de la fonction ">" passé en instance de Chaos.Lexical.