mikrobasic 4.00 error on "clrwdt"

Beta Testing discussion on mikroBasic PRO for PIC.
Post Reply
Author
Message
ervius
Posts: 32
Joined: 23 Jun 2010 19:18

mikrobasic 4.00 error on "clrwdt"

#1 Post by ervius » 09 Aug 2010 16:14

Hi, Mb 4.00 give error on command:
clrwdt

I didn't tryed with:
asm
clrwdt
endasm

but only clrwdt give error!

User avatar
tihomir.losic
mikroElektronika team
Posts: 2138
Joined: 02 Dec 2009 14:16
Location: Serbia
Contact:

Re: mikrobasic 4.00 error on "clrwdt"

#2 Post by tihomir.losic » 10 Aug 2010 13:08

Hello,

unfortunately, I didn't reproduce error.
Please, send me your code, or screen shot in moment when error appears.
I need that in order to reproduce your report, and try to solve that.

Thanks.

Best regards,

Losic Tihomir
mikroElektronika [Support team]

ervius
Posts: 32
Joined: 23 Jun 2010 19:18

Re: mikrobasic 4.00 error on "clrwdt"

#3 Post by ervius » 10 Aug 2010 14:59

ok, well.....
this code give error!:

Code: Select all

program test_structure
' Declarations section

sub procedure program_init()
    dim kj as byte
    dim lkj as byte
    
    'if you delete the "rem" by 
    'lkj=0, the nop and clrwdt after give error, else all work well.....
   
 '''''lkj=0
    
'theese 3 commands give error, after a dim declaration, all seems give error.
''''''''''''''''''''''''''''''''''''''
    nop
    clrwdt
'''''''''''''''''''''''''''''''''''''''
    for kj=0 to 100
        lkj=lkj+1
    next kj

 'while after a for/next loop, or only: lkj=0 theese 2 commands work ok!
''''''''''''''''''''''''''''''''''''''
    nop
    clrwdt
'''''''''''''''''''''''''''''''''''''''
end sub
main:
'   Main program 
program_init()

nop
clrwdt
end.
while this other one works well!.....

Code: Select all

program test_structure
' Declarations section

sub procedure program_init()
    dim kj as byte
    dim lkj as byte
    
    'if you delete the "rem" by 
    'lkj=0, the nop and clrwdt after give error, else all work well.....
    lkj=0
    
'theese 3 commands give error, after a dim declaration, all seems give error.
''''''''''''''''''''''''''''''''''''''
    nop
    clrwdt
'''''''''''''''''''''''''''''''''''''''
    for kj=0 to 100
        lkj=lkj+1
    next kj

 'while after a for/next loop, or only: lkj=0 theese 2 commands work ok!
''''''''''''''''''''''''''''''''''''''
    nop
    clrwdt
'''''''''''''''''''''''''''''''''''''''
end sub
main:
'   Main program 
program_init()

nop
clrwdt
end.
and....
in sub procedure program_init()
I only changed:

'''''lkj=0

with

lkj=0

after variables declaration.......

while in mb 3.8 both code work well.
config is:
pic 16F876 a 8Mhz on windows 7 32bits.

MAN
Posts: 437
Joined: 11 Jan 2006 18:32
Location: Brasil

Re: mikrobasic 4.00 error on "clrwdt"

#4 Post by MAN » 10 Aug 2010 18:22

Hi evius;

good it; this show exactly what happen when we don't initialize some local var after declare it.
The compiler expects that after one declaration one or more declared's var's will be initialized, if
don't happen, and the first line bellow is a instruction or another reference that don't is in this
context, the compiler issues a warning an error.
Maybe if the compiler had as ability for initializing the var when declared, it didn't happen.

Well the ME's would consider the declaration with initialization as:

Code: Select all

Dim var as byte = 'value' or without value.
The newly Basic compilers has this feature.
Working with you, for you!
MAN

ervius
Posts: 32
Joined: 23 Jun 2010 19:18

Re: mikrobasic 4.00 error on "clrwdt"

#5 Post by ervius » 10 Aug 2010 20:13

MAN wrote:Hi evius;

good it; this show exactly what happen when we don't initialize some local var after declare it.
The compiler expects that after one declaration one or more declared's var's will be initialized, if
don't happen, and the first line bellow is a instruction or another reference that don't is in this
context, the compiler issues a warning an error.
Maybe if the compiler had as ability for initializing the var when declared, it didn't happen.

Well the ME's would consider the declaration with initialization as:

Code: Select all

Dim var as byte = 'value' or without value.
The newly Basic compilers has this feature.
shure, this is an important improvement (dim x as word = 1234), but above of all, I think is important to solve this bug, in mp 3.8 both code work, and sometimes appen that I don't assign some values at variables declared, and then, in mb 4.00 beta, this mean have an error!!!!!

ervius
Posts: 32
Joined: 23 Jun 2010 19:18

Re: mikrobasic 4.00 error on "clrwdt"

#6 Post by ervius » 11 Aug 2010 09:26

..... maybe this is a not interesting bug.....

MAN
Posts: 437
Joined: 11 Jan 2006 18:32
Location: Brasil

Re: mikrobasic 4.00 error on "clrwdt"

#7 Post by MAN » 11 Aug 2010 13:46

hi ervius;

I coudn't say exactly this, i believe that ME's treat all bug's and issues as important, maybe, one has more priority that others,
but all in future will be solved, I hope. At present project phase, all bug's and changes needing to be treat with very caution because
a small change without previous study, could be a desaster. ME's team will have a serious and hard work ahead. Maybe we pass
through some releases up to all take effect, without say that it be at constant improvement.
Working with you, for you!
MAN

User avatar
tihomir.losic
mikroElektronika team
Posts: 2138
Joined: 02 Dec 2009 14:16
Location: Serbia
Contact:

Re: mikrobasic 4.00 error on "clrwdt"

#8 Post by tihomir.losic » 11 Aug 2010 15:07

ervius wrote:..... maybe this is a not interesting bug.....
Hello ervius,

our Software department, and Technical Support department do not distinguish between your applications, reports and bugs, as well as between users, projects and problems.
We are currently at the stage of testing all of your reports, and each issue which you sent to us, we are run, tested and checked.

Yes, this is definitely bug, as workaround write any non-assembler instruction after define variables, and before asm instruction, you'll be able to run your project.

It'll be passed to software developers, and they'll try to solve that for the final release.

Sorry for the inconveniences, and thank you for pointing this.

Best regards,

Losic Tihomir
mikroElektronika [Support team]

Post Reply

Return to “mikroBasic PRO for PIC Beta Testing”