;Example of bdbfs plugin file.
;Sum All Numeric Fields of current DBF.

#include clipper.ch

cCodePage:='cp866'
_SA_For := '.T.'
_SA_Sum := 0
_SA_nRec := RECNO()

GO TOP

#IF Continue("Do you want to sum all the numeric fields?")
;you must use the first "=" here!
	=NFIND(While("!EOF()",;
			 "_SA_Sum := _SA_Sum + SumLine()",;
			 _SA_For, .T.), , , "Total Sum is:")
#ELSE
	NFIND("May be next time...")
#ENDIF

;Instead of While() function, you can also use the expression:
;Sum("SumLine()")

GOTO _Sa_nRec

RELEASE _SA_nRec
RELEASE _SA_Sum
RELEASE _SA_For
