mikrobasic 4.00 error on "clrwdt" and "nop"

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" and "nop"

#1 Post by ervius » 11 Aug 2010 11:17

I have 2 examples, one works, while the other one not, I only remmed or not a cariable.....

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.

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

Re: mikrobasic 4.00 error on "clrwdt" and "nop"

#2 Post by tihomir.losic » 12 Aug 2010 08:01

Hello,

please, follow this link in order to find out more about your issue:
http://www.mikroe.com/forum/viewtopic.php?f=91&t=26339
In order to receive better support, please, write your questions,
regarding the same issue on one forum topic.

Thank you.

Best regards,

Losic Tihomir
mikroElektronika [Support team]

Post Reply

Return to “mikroBasic PRO for PIC Beta Testing”