Closed sowebio closed 3 years ago
The function To_VString is now available within HAC (rev #277), though only for converting a string literal to a VString. However in your example you are trying to convert a Character to a VString using To_VString. This is not supported by HAC_Pack either. But I could add this feature (in both: HAC and the HAC_Pack package for full Ada) if you'd like me to.
Reminder for Gautier : Inconsistency between HAC_Pack and what HAC - which only knows “+” - does internally.
Context :
Call To_Hex from : Put_Line (To_Hex (255) & To_Hex (15));
function To_Hex (Byte : Integer) return VString is Hex_Range : String (0..15) := "0123456789ABCDEF"; begin -- NOK <--- LIGNE 120 return To_VString(Hex_Range(Byte / 16)) & To_VString(Hex_Range(Byte mod 16));
-- OK - result : FF0F --Put(Hex_Range(Byte / 16)); Put(Hex_Range(Byte mod 16)); --return +""; end To_Hex;
Give : gnx-instance 120:9-19: undefined identifier
To_VString is seen as undefined