I would like to cast an existing string to an enum (not read it in as an enum). How can I do this?
example:
-- type declaration
type Hands is (Left, Right);
-- code body
Hand : Hands;
Hand := Hands'Value("Left"); -- yields `Left`
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With