Re: Could someone explain this variable please



On 2005-04-24, Tim <tim@xxxxxxxx> wrote:
>
> What exactly is this declaring?
>
> somevar: 0..100;

It is an integer subtype with range 0..100

> And how and why is it used?

For safety/debugging. When compiled with rangechecking on, an overflow at
values higher than 100, or below zero will be detected. It also allows the
compiler to downgrade to a smaller size than integer (e.g. smallint).

.