FOUND( ) Function Examples

In the following example, all customers from Germany are counted.

SET TALK OFF
CLOSE DATABASES
OPEN DATABASE (HOME(2) + 'Data\testdata')
USE customer  && Opens Customer table

STORE 0 TO gnCount
LOCATE FOR UPPER(country) = 'GERMANY'
DO WHILE FOUND( )
   gnCount = gnCount + 1
   CONTINUE
ENDDO
WAIT WINDOW 'Total customers from Germany: ' ;
   + LTRIM(STR(gnCount)) NOWAIT