Help on string representation of enumeration

How to make an enumeration E’Image shows as typed instead of being converted to UPPER or lower case? I want what I typed such as “BlackWhite” stays like that when I print it out on terminal or others. Looking around in Gnat I saw GNAT.Case_Util, which is supposed to be used by applications instead of System.Case_Util.

GNAT.Case_Util has only a procedure To_Mixed which preserved Capital letters for the beginning of the word or after underscore. Good for Ada style, not so good for parameters inherited from other languages. GNAT.Case_Util has a parameter of in out String, which Put_Line don’t like (compiler throws an error saying a procedure cannot be used as a parameter for a procedure). Meanwhile System.Case_Util package has a function of To_Mixed, which is not listed in GNAT.Case_Util package.

So back to the question, what should I do to get a displayed “BlackWhite”, “MediumRed” or “18Grey” instead of all upper or lower case?

Bad luck - there’s nothing in the RM to force output in the style of declaration. You either redefine the Image attribute or define a constant array with the images.
BTW: 18Grey is no enumeration literal.

@Nordic_Dogsledding is right, there is nothing for that in ARM.

On my side, for Aclida framework (public release this month, if I had the time), I defined an image function that let to define the corresponing image of enumeration literals, by stripping eventual prefix/suffix.

Thank you for the tip. So I need to roll my own function.

You have to use string formatting facilities and wrap 'Image. The reference manual dictates you pick a normalised form for identifiers, including enum names. You should use underscores in names so you can go through and capitalise more easily.