[英]How to exclude the first element of an enumerated Type used as an array index in delphi?
I want to exclude the first value of this enumerated type 我想排除此枚举类型的第一个值
type
TEnum = (val0, val1, val2, val3, val4);
in order to make this array 为了制作这个数组
TBValues: array [low(TEnum)..High(TEnum)] of boolean;
contains only the last n-1 values (in this case n=5). 仅包含最后的n-1个值(在本例中为n = 5)。
I tried this: 我试过这个:
TBValues: array [low(TEnum)+1..High(TEnum)] of boolean;
but I guess arithmetic operations are not allowed in this case because I'm getting this compiler error 但我想在这种情况下不允许进行算术运算,因为我收到了这个编译错误
E2010 Incompatible types: 'Int64' and 'TEnum' E2010不兼容类型:'Int64'和'TEnum'
How to do this? 这个怎么做?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.