3 Votes Vote

Logic programming help

Posted by topdog 523 days ago Questions| empty infos logic All

A = if infos !empty and inputs empty - do remove;

B = if infos empty and inputs !empty - do add;

C = if infos !empty and inputs !equal to infos - do add;

We can have like:

if B //it's the most common operation, so at the beginning.
{
  //add 
}
else
{
 //remove
}
elseif(c) 
{
 //the same add
} 

I believe this can be better thinking. Can I have your help?

Thanks in advance,

Originally asked by: MEM on Stack Overflow

Discuss Bury


Who Voted for this Question