Dear Stata users,

I wrote a very simple program to caculate efficacy coefficient. The program is as follows. However, Stata only run the second piece of program (i.e. the second if sentence). Can anybody point out where the problem lay, thank you.

Code:
program define efcoef

syntax varlist[, Low(integer 100) High(integer 100) help]

 tokenize `varlist'

 if ("`help'"!="help" & "`low'`high'"=="") {
  foreach v of varlist `varlist' {
   tempvar `v'min `v'max `v'mean
   egen ``v'min'=min(`v')
   egen ``v'max'=max(`v')
   egen ``v'mean'=mean(`v')
   gen efcoef_`v'=round((`v'-``v'min')/(``v'max'-``v'min')*40+60, 0.01)
   label var efcoef_`v' "efficacy coef: min-max of `v'"
  }
 }

 if ("`help'"!="help" & "`low'`high'"!="") {
  foreach v of varlist `varlist' {
   tempvar `v'min `v'max `v'mean
   egen ``v'min'=min(`v')
   egen ``v'max'=max(`v')
   egen ``v'mean'=mean(`v')
   gen efcoef_`v'=round((`v'-``v'min')/(``v'max'-``v'min')*40+60, 0.01)
   gen efcoef_`v'_2=round((`v'-`low')/(`high'-`low')*40+60, 0.01)
   label var efcoef_`v' "efficacy coef: min-max of `v'"
   label var efcoef_`v'_2 "efficacy coef: low-high of `v'"
  }
 }

 if ("`help'"=="help") {
  display "efcoef var will generate ecoef_var=(var-`v'min)/(`v'max-`v'min)*40+60"
  display "efcoef var, low(int) high(int) help"
 }

end