名词性从句分为主语、表语、宾语和同位语从句。if只有在动词后的宾语从句中引导从句,其它情况用whether。
I don't know if /whether he will come today.
=I have no idea iwhether he will come today.
His success depends on whether he will work hard.
Whether we will go out for a walk depends on the weather.