continue 命令示例

在下面的示例中,统计所有法国顾客的数目并显示总数。所有记录可用 locate 命令和循环语句中的 continue 命令来查找。


close databases
open database (home( ) + 'samples\data\testdata')
use customer && 打开 customer 表
set talk off
store 0 to gncount

locate for alltrim(upper(country)) = 'france'
do while found( )
gncount = gncount + 1
continue
enddo
? 'total customers from france: '+ ltrim(str(gncount))