Code: Select all
const my_short_const: short = -1;
Code: Select all
my_short_var := short(my_short_const);
#1 Post by janni » 18 Apr 2009 17:58
Code: Select all
const my_short_const: short = -1;
Code: Select all
my_short_var := short(my_short_const);
#2 Post by zristic » 22 Apr 2009 13:04
#3 Post by srdjan » 22 Apr 2009 13:17
I can not reproduce this, it could be that it was fixed in the meantime. Could you, please, give me a code example to srdjan@mikroe.com?janni wrote:When assigning a signed constant with negative value declared in a unit, liketo the same type variable in main unit, the compiler issues an error 'Argument is out of range..'. Explicitely specifying the type, likeCode: Select all
const my_short_const: short = -1;
prevents the error to show up. This concerns any signed integral type. There is no such problem, though, if the constant is declared in main unit.Code: Select all
my_short_var := short(my_short_const);
#4 Post by janni » 22 Apr 2009 17:48
Wouldn't be the first time you fixed something before it was noticed . An example was sent.srdjan wrote:I can not reproduce this, it could be that it was fixed in the meantime. Could you, please, give me a code example to srdjan@mikroe.com?
#5 Post by srdjan » 23 Apr 2009 08:14
Yes, it was a bug Fixed. Thanks.janni wrote:Wouldn't be the first time you fixed something before it was noticed . An example was sent.srdjan wrote:I can not reproduce this, it could be that it was fixed in the meantime. Could you, please, give me a code example to srdjan@mikroe.com?
Return to “mikroPascal PRO for PIC Beta Testing”