On 17 jan 2007, at 12:28, Alexander Todorov wrote:

On 16 jan 2007, at 15:55, Matt Emson wrote:

>> The reason is that it tries to convert S to a number rather than V to
>> a string. The error is still in the current 2.1.1.

May be the compiler should generate compile time error or a warning.

The whole point of variants is that it allows you to get around compile time type checking. If you want compile time type checking, don't use variants. Giving a warning for each "non-variant + variant" operation which might fail would give a warning for pretty much every such operation, since there are virtually always combinations which may not give a valid result.


Jonas


_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to