Code help!

Post your requests and ideas for the mikroElektronika website & forums.
Post Reply
Author
Message
krikri
Posts: 1
Joined: 23 Feb 2015 12:22

Code help!

#1 Post by krikri » 23 Feb 2015 12:30

hi, i just start use mIkroC, pliz i wish to know if o can make a switch ans case with a port? i mean like this:

switch(PORTA){
case !porta.f0 : portd.f0=1;
break;
case !porta.f4: portd.f3=0;
break;
}

:o :o :o :o
is it possible?
thk u!

User avatar
darko.minic
Posts: 747
Joined: 01 Dec 2014 11:10

Re: Code help!

#2 Post by darko.minic » 24 Feb 2015 10:47

Hello,

The case labels need to be constant. !porta.f0 is changeable, so it can't be constant.
Can you explain me your idea with more details so I can be able to help you with your code?

Regards,
Darko

Post Reply

Return to “Website & Forums Wishlist”