Hi, What does the ";" at the end of an IF statement signify? e.g. try { If (strvalue <> "ABC") ; <--- { return true; } return false; } Is the IF the same meaning as without the ";" at the end ? cheers Andrew
hello Andew, ";" just means an end of statement..... so if(x==4); x=7; means that x will always assigned 7 since the first statemet after if is already executed. so its wrong to put ; after ifs.... jst try out a console application with the above example .. Regards, ~VInu "Andrew" wrote: > Hi, > > What does the ";" at the end of an IF statement signify? > > e.g. > try > { > If (strvalue <> "ABC") ; <--- > { > return true; > } > return false; > } > > Is the IF the same meaning as without the ";" at the end ? > > cheers > Andrew
thanks "Vinu" wrote: > > hello Andew, > > ";" just means an end of statement..... > > so if(x==4); > x=7; > > means that x will always assigned 7 since the first statemet after if is > already executed. so its wrong to put ; after ifs.... > > jst try out a console application with the above example .. > > Regards, > ~VInu > "Andrew" wrote: > > > Hi, > > > > What does the ";" at the end of an IF statement signify? > > > > e.g. > > try > > { > > If (strvalue <> "ABC") ; <--- > > { > > return true; > > } > > return false; > > } > > > > Is the IF the same meaning as without the ";" at the end ? > > > > cheers > > Andrew