【发布时间】:2012-10-11 01:04:51
【问题描述】:
我想将现有字符串转换为枚举(而不是作为枚举读入)。我该怎么做?
【问题讨论】:
我想将现有字符串转换为枚举(而不是作为枚举读入)。我该怎么做?
【问题讨论】:
示例:
-- type declaration
type Hands is (Left, Right);
-- code body
Hand : Hands;
Hand := Hands'Value("Left"); -- yields `Left`
【讨论】: