range check Variable

Post your requests and ideas on the future development of mikroPascal PRO for ARM.
Post Reply
Author
Message
corado
Posts: 399
Joined: 28 Mar 2009 11:03

range check Variable

#1 Post by corado » 30 Aug 2017 21:39

How nice would be this?
var
i: 0..19;
begin
i:= 21;
end.

Then the Compiler will indicate a error Massage..that is out of Range...
There is no need to write
I: BYTE;
Because with i: 0..19;
the compiler will descide wich is the best, and a range test is include...

http://forum.lazarus.freepascal.org/ind ... 933.0.html

Post Reply

Return to “mikroPascal PRO for ARM Wish List”