atcline( ) 函数示例

示例 1 将指针定位到备注字段中某个字符串首次出现的位置,并且显示表“employee”中的姓名字段和包括字符串的备注行。

示例 2 说明备注的宽度如何影响 atcline( ) 函数的返回值。

*示例 1
close databases
open database (home( ) + 'samples\data\testdata')
use employee && 打开表 employee

clear
store 'japanese' to gcfindstring && 不区分大小写
locate for atcline(gcfindstring, notes) != 0
? first_name
?? last_name
? mline(notes, atcline(gcfindstring, notes))

*示例 2
store '1234567890abcdefghij' to gcstring
set memowidth to 20
? atcline('ab', gcstring) && 显示数值 1
set memowidth to 10
? atcline('ab', gcstring) && 显示数值 2