Actually "wrap back" is probably not the correct behaviour for succ/pred.

So it should probably not "wrap back".

Instead it could give an out of range error message.

However at least Low and High should be able to be used on the dynamic range 
type, so that these limits can dynamically be acquired with those two 
functions.

This could help...

The user can then modify code from static to dynamic with minimal changes:

if Index = High(DynamicRangeType) then
begin
Index := Low(DynamicRangeType);
end;

To implement the range of the dynamic range type perhaps the following could 
be used:

SetLow( DynamicRangeType, 5000 );
SetHigh( DynamicRangeType, 6000 );

An oo version could also look like;

DynamicRangeType.SetLow( 5000 );
DynamicRangeType.SetHigh( 6000 );

Bye,
  Skybuck. 
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to