Negative Sub Range error
I was wondering if it's possible to declare
Value1, Value2: Set of -2..-1;
I'm getting a compile error: [DCC Error] ShowUtils.pas(98): E2028 Sets may have at most 256 el开发者_如何学Goements.
By my maths that's 2 elements -2 and -1 why does the compiler think there's more than 256?
using Delphi 2007
This error appears because, the ordinal values of the bounds of the set must be between 0 and 255. so you cannot use negative numbers in a set, Additionally you can check the documentation about the compiler error E2028 Sets may have at most 256 elements (Delphi)
精彩评论