我想将一个现有的字符串转换为枚举(不作为枚举读取).我怎样才能做到这一点?
例:
-- type declaration
type Hands is (Left, Right);
-- code body
Hand : Hands;
Hand := Hands'Value("Left"); -- yields `Left`
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1572 次 |
| 最近记录: |