Question: How to solve if statement?

I have a condition delta(k-r-1);k and  r are integers;

if k-r-1=0,then delta(k-r-1)=1;

if k-r-1 not equal to 0,then delta(k-r-1)=0;

How to write this in if statement?

Please Wait...