constant array size check

Discuss about beta versions of mikroPascal compiler.
Post Reply
Author
Message
janni
Posts: 5373
Joined: 18 Feb 2006 13:17
Contact:

constant array size check

#1 Post by janni » 12 Sep 2007 15:50

Constant array size check is not fully performed. Only lower limit is checked, i.e. when there are not enough data in declaration. Following declarations are accepted by compiler:

Const tempc: array [7] of Integer = (5000, 2500, 1250, 625);

Const tempc: : array [0..15] of char = ('0','1','2','3');

Is this intentional?

BTW, is placing zero after array of char, like it was a string, really necessary? Cause compiler does that.

User avatar
zristic
mikroElektronika team
Posts: 6608
Joined: 03 Aug 2004 12:59
Contact:

Re: constant array size check

#2 Post by zristic » 13 Sep 2007 07:48

janni wrote:is placing zero after array of char, like it was a string, really necessary? Cause compiler does that.
It was users' wish.

Post Reply

Return to “mikroPascal Beta testing”