vfp icase function, visual foxpro ICASE() function, 3
ICASE(), what is ICASE
Code:
mname1 = "Shyam"
mtotpercent1 = 45
mClass1 = GetClass(mname1,mtotpercent1)
MESSAGEBOX(mClass1,0+654,"Class Type")
mname2 = "Ram"
mtotpercent2 = 59
mClass2 = GetClass(mname2,mtotpercent2)
MESSAGEBOX(mClass2,0+654,"Class Type")
mname3 = "Hussain"
mtotpercent3 = 78
mClass3 = GetClass(mname3,mtotpercent3)
MESSAGEBOX(mClass3,0+654,"Class Type")
mname4 = "John"
mtotpercent4 = 100
mClass4 = GetClass(mname4,mtotpercent4)
MESSAGEBOX(mClass4,0+654,"Class Type")
PROCEDURE GetClass
LPARAMETERS StudentName,TotPercent
RETURN ICASE(TotPercent <= 45 , "Pass Class", TotPercent <= 59.99,"Second Class", TotPercent <=99.99 ,"First Class","Merit")