FUNCTION CountUndeleted LPARAMETER cAlias LOCAL cInAlias, cOrder, cDeleted, nRecPos, nDeleteCount, nResult IF USED(cAlias) cInAlias = ALIAS() SELECT(cAlias) cOrder = cOrder cDeleted = SET('DELETED') nRecPos = RECNO() SET DELETED OFF SET ORDER TO 0 COUNT FOR DELETED() TO nDeleteCount nResult = RECCOUNT() - nDeleteCount IF cDELETED = 'ON' SET DELETED ON ENDIF IF nRecPos # 0 GO nRecPos ENDIF IF ! EMPTY(cOrder) SET ORDER TO &cOrder ENDIF IF ! EMPTY(cInAlias) SELECT (cInAlias) ELSE SELECT 0 ENDIF RETURN nResult ELSE RETURN NULL ENDIF>And if I have to write a function, what kind of conditions have to be included in it?