Visual FoxPro函数汇总表
- 格式:doc
- 大小:126.00 KB
- 文档页数:6
VFP常用函数总汇VFP常用函数总汇VFP常用函数使用说明1、数值运算函数函数操作例结果SQRT(x) 求平方根 SQRT(9) 3INT(x) 取整数 INT(3.14) 3ROUND(x) 四舍五入 ROUND(3.14159,4) 3.1416MOD(x,y) 求X除以Y的余数 MOD(25,4) 1MAX(x,y) 求X,Y中的最大值 MAX(7,8) 8MIN(x,y) 求X,Y中的最小值 MIN(1,2,3) 12、字符中操作函数函数名操作例结果UPPER(S)小写字母 UPPER(abc) ABCLOWER(S)大写字母 LOWER(ACD) acdLEN(S)求字符串的长度 LEN("中国1号") 7AT(S1,S2)在字符串S2,找字符串S1 AT("H","CHINA") 2SUBSTR(S,I,N)在S字符串中的第I个字符起取N个字符SUBSTR('TECHNOLO',3,3) CHNLEFT(S,N)从字符串S左边取N个字符 LEFT(“中国人”,4)中国RIGHT(S,N)从字符串S右边取N个字符S=‘12345’RIGHT(S,3) 345SPACE(N)生成N个空格 "合计"+SPACE(2)+"123" 合计123 TRIM(S)消除字符串尾部空格 TRIM("姓名 ") 姓名ALLTRI(S)消除字符串中所有空格 ALLTRIM("李丽")李丽STUFF(S1,N1,N2,S2) 用字符串S2替换S1中第N1个字符起的N2个字符 STUFF("NOW",2,1,"E") NEW& 宏替换P=“G2”USE &P USE G23、日期和时间函数函数名操作例结果DATE()求当前日期 DATE() 2001/11/12DATETIME() 求当前日期和时间 DATETIME() 2001/11/12/0:22:33amYEAR(D)求年份 YEAR(DATE()) 2001MONTH(D)求月份(数值) MONTH(DATETIME()) 11CMONTH(D)求月份(字符)MONTH(DATETIME()) NovenberDAY(D)求日期 DAY(DATE()) 12DOW(D)求星期几(数值) DOW(DATE()) 1CDOW(D)求星期几(英文) CDOW(DATE()) sundayTIME(D)求当前时间 TIME(DATE()) 10:20:38am4、数据类型转换函数函数名操作例结果ASC(S)求第一个字符串的ASCII码 ASC("what") 87CHR(N)求ASCII码的字符 CHR(87) wSTR(R,L,D) 数值转换成字符,L为长度,D为小数位数 X=3.1415STR(X,6,2) 3.14VAL(S)字符串转换为数值 VAL("123") 123.00CTOD(S)字符串转日期 CTOD('11/01/2002') 11/01/2002DTOC(D)日期转换成字符串 DTOC(DATE()) 11/01/2002DTOS(D)把日期转成年月日式的字符串DTOS(DATE()) 20021101CTOT(C)字符串转成日期时间型CTOT(11/01/2002 10:30:50am) 11/01/2002 10:30:50amDTOT(D)日期型转为日期时间型DTOT(DATE()) 11/25/2001 00:00:01amTTOC(T)日期时间型转为字符型TTOC(DATETIME()) 11/25/2001 00:00:01amTTOD(T)日期时间型转为日期型TTOD(DATETIME()) 11/25/2001IIF(LE,E1,E2) 逻辑判断 IIF(A>0,"YES","NO") YES5、检测函数函数名操作例结果RECNO()检测当前记录号 RECNO() 1RECCOUNT()检测当前记录数 RECCOUNT() 12BOF()开始记录 BOF() 1EOF()最后记录 EOF() 12FOUND()返回查找结果 FOUND() .T.ROW()返回当前行坐标 ROW() 1COL()返回当前列坐标 COL() 1SYS(N)返回系统状态 SYS(13)联机状态。
Visual FoxPro常用内部函数函数的一般形式是:函数名(自变量表)其中函数名是系统规定的,自变量表可以是一个变量或多个自变量,也可以为空,即:函数名(),此时函数名后面的一对圆括号不能省略。
1、数学函数(数值函数)求绝对值函数A B S格式:A B S(e x p N)求整函数I N T格式:I N T(e x p N)四舍五入函数R O U N D格式:R O U N D(e x p N,〈保留小数位〉)功能:按保留小数位指定的位数对e x p N的数值进行四舍五入。
说明:当保留小数位为正整数或零时,系统将自动对其后一位上的数进行四舍五入处理;当其为负数时,舍入将在整数部分进行,这时保留小数位的绝对值为从个位开始向左被舍入的位数。
?R O U N D (3.14159,3)→ 3.14200F L O O R()函数对于给定的数值型表达式的值,返回小于或等于它的最大整数。
格式:F L O O R(e x p N)C E I L I N G ()函数返回大于或等于指定数值表达式的下一个最高整数。
语法C E I L I N G(e x p N)返值类型指数函数E X P、自然对数函数L O G、平方根函数S Q R T、格式:E X P|L O G|S Q R T(e x p N)取模(求余数)函数M O D格式:M O D(e x p N1,e x p N2)功能:取e x p N1除以e x p N2的余数。
说明:余数的正负号与e x p N2相同。
当两个表达式的值同号时,函数值为e x p N1除以e x p N2所得到的余数;两个表达式的值异号时,函数值为e x p N1除以e x p N2所得到的余数再加上e x p N2的值。
?M O D(20,3)→2?M O D(20,-3)→-1?M O D(-20,-3)→-2?M O D(-求最大值M A X、最小值M I N格式:M A X|M I N(e x p1,e x p2[,…])功能:求e x p1和e x p2[,…]中的最大、最小者。
Visual FoxPro函数&命令&知识点常用函数篇1.取整函数? INT(数值表达式)返回类型:数值型? INT (12.56) &&屏幕显示: 122.四舍五入函数? ROUND(数值表达式,有效位数)返回类型: 数值型?ROUND(12.345,1) &&函数指定保留1位小数屏幕显示: 12.3 ? ROUND(12.345,2) &&函数指定保留1位小数屏幕显示: 12.353.平方根函数? SQRT(数值表达式)返回类型: 数值型? SQRT(81) &&屏幕显示: 9.00? SQRT(-81) &&屏幕显示:错误信息4.日期、时间函数? YEAR(日期表达式) &&:年份数值返回类型: 数值型? MONTH(日期表达式) &&:月份数值返回类型: 数值型? DAY(日期表达式) &&:日的数值返回类型: 数值型? DATE() &&屏幕显示:当前系统日期? YEAR(DATE( )) &&屏幕显示:当前系统日期的年份? TIME( ) &&屏幕显示:当前系统时间5.空格SPACE函数? SPACE(空格个数)返回类型: 字符型? "姓名" &&屏幕从第1列开始显示: 姓名? SPACE (20)+"姓名" &&屏幕从第21列开始显示: 姓名6.删除空格函数? LTRIM(字符表达式) &&:删除指定字符串左边的先导空格返回类型:字符型? RTRIM(字符表达式)&&:删除指定字符串右边的尾随空格返回类型:字符型? ALLTRIM(字符表达式)&&:删除指定字符串的先导和尾随空格返回类型:字符型? LTRIM(SPACE(4)+"姓名 ")+"班级" &&屏幕显示:姓名班级? RTRIM(SPACE(4)+"姓名 ")+"班级" &&屏幕显示:姓名班级? ALLTRIM(SPACE(4)+"姓名 ")+"班级" &&屏幕显示:姓名班级7.截取字符串函数? RIGHT(字符表达式,字符个数)返回类型:字符型? SUBSTR(字符表达式,起始位置[,字符个数])返回类型:字符型? RIGHT ("XSDA.DBF,3") &&屏幕显示: DBF? LEFT ("XSDA.DBF,4") &&屏幕显示:XSDA? SUBSTR ("数据管理系统") &&屏幕显示:管理8.测试函数返回值? LEN(字符型表达式) TYPE("表达式") 返回类型:数值型? TYPE( ) 返回类型:字符型? LEN(SPACE(20)) &&屏幕显示字符串长度:20 ? TYPE("DATE()") &&屏幕显示DATE函数的数据类型: D9.数字转换成字符函数? STR(数值表达式[,长度[,小数位数]])返回类型:字符型? STR(1357.246,6,2) &&屏幕显示转换后的字符串: 1357.2? STR(1357.246) &&屏幕显示转换后的字符串: 1357? STR(1357.246,3) &&屏幕显示转换后的字符串:? LEN(STR(4)) &&屏幕显示转换后的字符串的长度: 10 10.字符转换成数字函数? VAL(字符表达式) 返回类型:数值型? VAL("246XS34") &&屏幕显示转换后的数字: 246.00? VAL("XS246") &&屏幕显示转换后的数字: 0.0011.日期转换字符函数? DTOC(日期表达式[,1]) 返回类型: 字符型? DTOC ({^2010/01/03}) &&屏幕显示转换后的字符串: 01/03/2010? DTOC({^2010/01/03},1) &&屏幕显示转换后的字符串:2010010312.大小写转换函数? LOWER(字符表达式) &&: 大写转换小写返回类型:字符型? UPPER(字符表达式) &&: 小写转换大写返回类型:字符型? UPPER("FoxPro") &&屏幕显示转换为大写字母的结果: FOXPRO ? LOWER("FoxPro") &&屏幕显示转换为小写字母的结果: foxpro 13.字符转换为 ASCII码函数? ASC(字符表达式) 返回类型:数值型? ASC("A") &&屏幕显示: 6514.ASCII码转换为字符函数? CHR(数值表达式) 返回类型:字符型? CHR(65) &&屏幕显示: A15.最值函数? MAX大(表达式1, 表达式2…) &&:最大值返回类型:数值型? MIN小 (表达式1, 表达式2…) &&:最小值返回类型:数值型? MAX(12,20,54) &&屏幕显示:54.00? MIN(12,20,54) &&屏幕显示:12.0016.测试当前记录号:? RECNO( ) &&:返回当前表的当前记录号。
Visual FoxPro常用函数汇总表函数分类1、数学函数函数用途ABS(<数值表达式>)绝对值,|x|CEILING(<数值表达式>) >=自变量的最小整数EXP(<数值表达式>)对基E的幂,e=2.71828 FLOOR(<数值表达式>) <=自变量的最大整数INT(<数值表达式>)取整(舍尾)自变量LOG(<数值表达式>)自变量的自然对数,ln x LOG10(<数值表达式>)自变量的普通对数,lg x MAX(<表达式1>,<表达式2>)两个值的最大值MIN(<表达式1>,<表达式2>)两个值的最小值MOD(<数值表达式1>,<数值表达式2>)求余数RAND([<数值表达式1>])返回伪随机数ROUND(<数值表达式1>,<数值表达式2>)四舍五入第一个自变量SIGN(<数值表达式>)自变量的符号SQRT(<数值表达式>)平方根(正根)2、字符串操作函数函数用途&<内存变量> 用于代替内存变量内容LEN(<字符串表达式>)返回字符串表达式的字符个数SPACE(<数值表达式>)生成空格SUBSTR(<字符串表达式>,<数值表达式n>[,<数值表达式L>])求子字符串,从指定的字符串表达式第n个开始,总长为L的字符串LOWER(<字符串表达式>)将字符串字母转换成小写字母UPPER(<字符串表达式>)将字符串字母转换成大写字母TRIM(<字符串表达式>)删除字符串尾空格ASC(<字符串表达式>)返回字符串表达式最左边的第一个字符的ASCII码CHR(<数值表达式>)将数值表达式转换成字符AT(<字符串表达式1>,<字符串表达式2>[,<数值表达式n>])确定字符串表达式1在字符串表达式2中的位置,n为字符串表达式第几次出现STR(<数值表达式>[,<数值表达式L>][,<数值表达式n>)将数值转换为字符串,L为数值表达式总长,n为小数位数VAL(<字符串表达式>)将数字字符串转换为数字TYPE(<表达式>)检测表达式值的数据类型LTRIM(<字符串表达式>)删除字符串左部空格RTRIM(<字符串表达式>)删除字符串右部空格LEFT(<字符串表达式>,<数值表达式n>)取字符串左边部分字符,n为返回的字符个数RIGHT(<字符串表达式>,<数值表达式n>)取字符串右边部分字符,n从右边截取字符个数3、表(.dbf)操作函数函数用途BOF([<工作区号或别名>])查表文件开始函数EOF([<工作区号或别名>])表文件结尾测试函数RECNO([<工作区号或别名>])测试当前或指定工作区表的当前记录号DELETED([<工作区号或别名>])记录删除测试函数FILE(<"字符串">)测试文件是否存在函数DBF([<工作区号或别名>])检测表的文件名函数4、日期、时间函数函数用途DATE()查系统当前日期函数TIME([<数值表达式>])查系统当前时间函数YEAR(<日期型表达式>|<日期时间型表达式>)由日期查年函数MONTH(<日期型表达式>|<日期时间型表达式>)从日期查月份函数CMONTH(<日期型表达式>|<日期时间型表达式>)由日期查月份名函数DAY(<日期型表达式>|<日期时间型表达式>)从日期查当月的日函数DOW(<日期型表达式>|<日期时间型表达式>[,<数值表达式>])由日期查星期函数CDOW(<日期型表达式>|<日期时间型表达式>)从日期查星期名函数DTOC(<日期型表达式>|<日期时间型表达式>)日期转换为字符函数CTOD(<字符串表达式>)字符串转换为日期函数CTOT(<字符串表达式>)返回日期时间值函数TTOC(<日期时间型表达式>)返回字符值5、显示、打印位置函数函数用途ROW()判断光标行位置函数COL()判断光标列位置函数INKEY([<数值表达式>])检测用户所击键对应的ASCII码函数,数值表达式以秒为单位等待击键的时间6、其他函数函数用途DISKSPACE()返回默认磁盘驱动器中可用字节数函数OS()检测操作系统名称的函数VERSION()返回VFP版本号的函数。
一、 数值函数数值函数用于数值运算,其自变量与函数都是数值型数据。
1.取绝对值函数ABS( )【格式】ABS(<nExp>)【功能】计算nExp的值,并返回该值的绝对值。
2.指数函数EXP( )【格式】EXP(<nExp>)【功能】求以e为底、nExp值为指数的幂,即返回ex的值。
3.取整函数INT( )【格式】INT(<nExp>)【功能】计算nExp的值,返回该值的整数部分。
4.上界函数CEILING( )【格式】CEILING(<nExp>)【功能】计算nExp的值,返回一个大于或等于该值的最小整数。
5.下界函数FLOOR( )【格式】FLOOR(<nExp>)【功能】计算nExp的值,返回一个小于或等于该值的最大整数。
6.自然对数函数LOG( )【格式】LOG(<nExp>)【功能】求nExp的自然对数。
nExp的值必须为正数。
7.常用对数函数【格式】LOG10(<nExp>)【功能】求nExp的常用对数。
nExp的值必须为正数。
8.平方根函数SQRT( )【格式】SQRT(<nExp>)【功能】求非负nExp的平方根。
9.最大值函数MAX( )和最小值函数MIN( )【格式】MAX(<nExp1>,< nExp2>[,< nExp3>...])MIN(<nExp1>,< nExp2>[,< nExp3>...])【功能】返回数值表达式中的最大值MAX( )和最小值MIN( )。
10.求余数函数MOD( )【格式】MOD(<nExp1>,<nExp2>)【功能】返回nExp1除以nExp2的余数。
余数的小数位数与nExp1相同,符号与nExp2相同。
11.四舍五入函数ROUND( )【格式】ROUND(<nExp1>,< nExp2>)【功能】返回nExp1四舍五入的值, nExp2表示保留的小数位数。
大全数据库函数大全VisualFoxPro数据库函数ADATABASES()将所有打开数据库的名称和路径放到内存变量数组中ADBOBJECTS()把当前数据库中的命名连接名、关系名、表名或sQL视图名放到一个内存变量数组中AFIELDS()把当前表的结构信息存放在一个数组中,并且返回表的字段数ALIAS()返回当前表或指定工作区衰的别名ASESSIONS()创建一个已存在的数据工作期ID数组ATAGINFO()创建一个包含索引和键表达式的名字、数量和类型信息的数组AUSED()将一个数据工作期中的表别名和工作区存入内存变量数组BOF()确定当前记录指针是否在表头CANDIDATE()判断索引是否为候选索引CDX()根据指定的索引位置编号,返回打开的复合索引(.CDX)文件名称CPDBP()返回一个打开表所使用的代码页CREATEOFFLINE()由已存在的视图创建一个游离视图CURSORGETPROP()返回VisualFoxPro表或临时表的当前属性设置CURSORSETPROP()指定VisualFoxPro表或临时表的属性设置CURSORTOXML()转换VisualFoxPro临时表为XML文本CURVAL()从磁盘上的表或远程数据源中直接返回字段值DBC()返回当前数据库的名称和路径DBF()返回指定工作区中打开的表名,或根据表别名返回表名DBSETPROP()给当前数据库或当前数据库中的字段、命名连接、表或视图设置一个属性DELETED()返回一个表明当前记录是否标有删除标记的逻辑值DESCENDING()是否用DESCENDING关键字创建了一个索引标识DROPOFFLINE()放弃对游离视图的所有修改,并把游离视图放回到数据库中EOF()确定记录指针位置是否超出当前表或指定表中的最后一个记录FCOUNT()返回衰中的字段数目FIELD()根据编号返回表中的字段名FILTER()返回SETFILTER命令中指定的表筛选表达式FLDLIST()对于SETmELDS命令指定的字段列表,返回其中的字段和计算结果字段表达式FLOCK()尝试锁定当前表或指定表FOR()返回一个己打开的单项索引文件或索引标识的索引筛选表达式FOUND()如果CONTINUE、FIND、LOCATE或SEEK命令执行成功,函数的返回值为"真"FSIZE()以字节为单位,返回指定字段或文件的大小GETFLDSTATE()返回一个数值,标明表或临时表中的字段是否已被编辑,或是否有追加的记录,或者记录的删除状态是否已更改GETNEXTMODIFIED()返回一个记录号,对应于缓冲表或临时表中下一个被修改的记录HEADER()返回当前或指定表文件的表头所占的字节数IDXCOLLATE()返回索引或索引标识的排序序列INDBC()如果指定的数据库对象在当前数据库中,则返回"真"(.T.)INDEXSEEK()在一个索引表中搜索第一次出现的某个记录ISEXCLUSIVE()判断一个表或数据库是以独占方式打开的ISFLOCKED()返回表的锁定状态ISREADONLY()判断是否以只读方式打开表ISRLOCKED()返回记录的锁定状态KEY()返回索引标识或索引文件的索引关键字表达式KEYMATCH()在索引标识或索引文件中搜索一个索引关键字LOOKUP()在表中搜索字段值与指定表达式匹配的第一个记录LUPDATE()返回一个表最近一次更新的日期MDX()根据指定的索引编号返回打开的.CDX复合索引文件名MEMLINES()返回备注字段中的行数MLINE()以字符串形式返回备注字段中的指定行NDX()返回为当前表或指定表打开的某一索引(JDX)文件的名称ORDER()返回当前表或指定表的主控索引文件或标识PRIMARY()检查索引标识,如果为主索引标识,就返回"真"(.T.)RECCOUNT()返回当前或指定表中的记录数目RECNO()返回当前表或指定表中的当前记录号RECSIZE()返回表中记录的大小(宽度)REFRESH()在可更新的SQL视图中刷新数据RELATION()返回为给定工作区中打开的表所指定的关系表达式SEEK()在一个已建立索引的表中搜索一个记录的第一次出现位置SELECT()返回当前工作区编号或未使用工作区的最大编号SETFLDSTATE()为表或临时表中的字段或记录指定字段状态值或删除状态值SQLCANCEL()请求取消一条正在执行的SQL语句SQLCOLUMNS()把指定数据源表的列名和关于每列的信息存储到一个VisualFoxPro临时表中SQLCOMMIT()提交一个事务SQLCONNECT()建立一个指向数据源的连接SQLDISCONNECT()终止与数据源的连接SQLEXEC()将一条SQL语句送入数据源中处理SQLGETPROP()返回一个活动连接的当前设置或默认设置SQLMORERESULTS()如果存在多个结果集合,则将另一个结果集合复制到VisualFoxPro临时表中SQLPREPARE()在使用SQLEXEC()执行远程数据操作前,可使用本函数使远程数据为将要执行的命令做好准备SQLROLLBACK()取消当前事务处理期间所做的任何更改SQLSETPROP()指定一个活动连接的设置SQLSTRINGCONNECT()使用一个连接字符串建立和数据源的连接SQLTABLES()把数据源中的表名存储到VisualFoxPro临时表中SYS(14)索引表达式SYS(21)控制索引编号SYS(22)控制标识名或索引名SYS(2011)返回当前工作区中记录锁定或表锁定的状态SYS(2012)返回表的备注字段块大小SYS(2021)筛选索引表达式SYS(2029)返回与表类型对应的值SYS(3054)Rushmore优化等级·TAG()返回打开的.CDX多项复合索引文件的标识名,或者返回打开的.IDX单项索引文件的文件名TAGCOUNT()返回复合索引文件(.CDX)标识以及打开的单项索引文件(.IDX)的数目TAGNO()返回复合索引文件(.CDX)标识以及打开的单项索引(.IDX)文件的索引位置TARGET()返回一个表的别名,该表是SETRELATION命令的INTO子句所指定关系的目标UNIQUE()用于测试索引是否以惟一性方式建立UPDATED()用于测试在最近的READ命令中,数据是否已被修改USED()确定是否在指定工作区中打开了一个表XMLTOCURSOR()转换XML文本到VisualFoxPro游标或表----------------------------------------------Visual FoxPro日期和时间函数CTOD()把字符表达式转换成日期表达式。
VisualFoxPro磁盘_目录_文件函数ADIR()将文件信息存放到数组中,然后返回文件个数。
CURDIR()返回当前目录或文件夹。
DEFAULTEXT()如果一个文件没有扩展名,则返回一个带新扩展名的文件名。
DIRECTORY()若在磁盘上存在指定的目录,返回真(.T.)。
DISPLAYPA TH()为显示而截去长路径名到指定长度。
DRIVETYPE()返回指定驱动器的类型。
FDATE()返回文件最近一次修改的日期或日期时间。
FILE()如果在磁盘上找到指定的文件,则返回“真”(.T.)。
FILETOSTR()将一个文件的内容返回为一个字符串。
FORCEEXT()返回一个字符串,使用新的扩展名替换旧的扩展名FORCEPATH()返回一个文件名,使用新路径名代替旧文件名FTIME()返回最近一次修改文件的时间。
FULLPATH()返回指定文件的路径或相对于另一文件的路径。
GETDIR()显示“选择目录”对话框,从中可以选择目录或文件夹。
GETFILE()显示“打开”对话框,并返回选定文件的名称。
JUSTDRIVE()从完整路径中返回驱动器的字母。
JUSTEXT()从完整路径中返回三字母的扩展名。
JUSTFNAME()返回完整路径和文件名中的文件名部分。
JUSTPATH()返回完整路径中的路径名。
JUSTTEM()返回完整路径和文件名中的根名(扩展名前的文件名)。
LOCFILE()在磁盘上定位文件并返回带有路径的文件名。
PUTFILE()激活“另存为…”对话框,并返回指定的文件名。
STRTOFILE()将一个字符串的内容写入一个文件。
SYS(3)返回一个合法文件名,可用来创建临时文件。
SYS(5)返回当前VisualFoxPro的默认驱动器。
SYS(7)返回当前格式文件的名称。
SYS(2000)返回一个按字母排序的与文件名和扩展名梗概匹配的第一个文件名。
SYS(2003)返回默认驱动器或卷上的当前目录或文件夹的名称。
vfp函数大全(VFP function Daquan)Visual foxpro数据库函数Adatabases () 将所有打开数据库的名称和路径放到内存变量数组中Adbobjects () 把当前数据库中的命名连接名、关系名、表名或sql 视图名放到一个内存变量数组中Afields () 把当前表的结构信息存放在一个数组中, 并且返回表的字段数返回当前表或指定工作区衰的别名 (alias)Asessions () 创建一个已存在的数据工作期id数组Ataginfo () 创建一个包含索引和键表达式的名字、数量和类型信息的数组Aused () 将一个数据工作期中的表别名和工作区存入内存变量数组确定当前记录指针是否在表头 BOF ()判断索引是否为候选索引 (candidate)根据指定的索引位置编号 (CDX), 返回打开的复合索引 (CDX) 文件名称Cpdbp () 返回一个打开表所使用的代码页Createoffline () 由已存在的视图创建一个游离视图Cursorgetprop () 返回visualfoxpro表或临时表的当前属性设置Cursorsetprop () 指定visualfoxpro表或临时表的属性设置Cursortoxml () 转换visualfoxpro临时表为xml文本从磁盘上的表或远程数据源中直接返回字段值 Curval ()返回当前数据库的名称和路径 (DBC)返回指定工作区中打开的表名 (DBF), 或根据表别名返回表名Dbsetprop () 给当前数据库或当前数据库中的字段、命名连接、表或视图设置一个属性返回一个表明当前记录是否标有删除标记的逻辑值 (deleted)是否用descending关键字创建了一个索引标识 (Descending)Dropoffline () 放弃对游离视图的所有修改, 并把游离视图放回到数据库中确定记录指针位置是否超出当前表或指定表中的最后一个记录 EOF ()Fcount () 返回衰中的字段数目根据编号返回表中的字段名 (FIELD)返回setfilter命令中指定的表筛选表达式 (Filter)Fldlist () 对于setmelds命令指定的字段列表, 返回其中的字段和计算结果字段表达式尝试锁定当前表或指定表 flock ()For 返回一个己打开的单项索引文件或索引标识的索引筛选表达式()如果continue、find、locate或seek命令执行成功 found (), 函数的返回值为 "真"(以字节为单位, 返回指定字段或文件的大小 fsize)Getfldstate () 返回一个数值, 标明表或临时表中的字段是否已被编辑, 或是否有追加的记录, 或者记录的删除状态是否已更改Getnextmodified () 返回一个记录号, 对应于缓冲表或临时表中下一个被修改的记录返回当前或指定表文件的表头所占的字节数 (header)(IDXCOLLATE) sequence returns the index or index mark(INDBC) if the specified database object in the current database, returns true (.T.)(INDEXSEEK) in search of a record first appeared in an indexed table(ISEXCLUSIVE) to determine whether a table or database is openin exclusive mode(ISFLOCKED) return to the locked table(ISREADONLY) to determine whether the table open in read-only mode(ISRLOCKED) locked return records(KEY) index keyword expression returns the index mark or index file(KEYMATCH) search a keyword index in the index or index file(LOOKUP) the search field value with the specified expression, the first record in the tableLUPDATE () returns a date table last updatedMDX (.CDX) according to the composite index file number specified index return open nameMEMLINES () returns the number of rows in the memo fieldMLINE () returns the specified row in the memo field in string formNDX () returns for the current table or an index table to open the specified file name (JDX)ORDER () returns the current table or the specified table masterindex file or logo(PRIMARY) check index, if the main index, it returns "true" (.T.)RECCOUNT () returns the specified number or record in the tableRECNO () returns the current table or specify the current record number in the tableRECSIZE () returns the size for the record in the table (width)(REFRESH) refresh the data in the SQL view can be updated inRELATION () returns the expression specified for a given open workspace in the table(SEEK) in an indexed table in the search for the first time the position of a record(SELECT) the maximum number returned number or use the current workspace workspace(SETFLDSTATE) for a table or a temporary table in the field or record the specified field state value or delete state value(SQLCANCEL) request to cancel an executing SQL statements(SQLCOLUMNS) to specify the data source table column name and information on each column is stored in a temporary table in VisualFoxPro(SQLCOMMIT) submitted a transaction(SQLCONNECT) to establish a connection to the data source(SQLDISCONNECT) to terminate the connection with the data source(SQLEXEC) will be sent to a SQL statement in the source data processing(SQLGETPROP) returns an active connection the current settings or default settings(SQLMORERESULTS) if there is more than one set of results, will be another set of results copied to a temporary table in VisualFoxPro(SQLPREPARE) in the use of SQLEXEC () to perform remote data before operation, you can use this function to make the remote data ready for the command to execute(SQLROLLBACK) cancel any changes made during the current transaction(SQLSETPROP) specify a set of active connections(SQLSTRINGCONNECT) connection using a connection string and a data source(SQLTABLES) the data source table name stored in the temporarytable in VisualFoxProSYS (14) index expressionSYS (21) control index numberSYS (22) to control the name or index nameSYS (2011) returns the current workspace or record locking table locking stateSYS (2012) returns the memo field block size tableSYS (2021) screening indexSYS (2029) and returns the value corresponding to the table typeSYS (3054) Rushmore - grade optimizationTAG (.CDX) name returns the number of composite index file open, or return to the open.IDX index file nameTAGCOUNT (return) composite index file (.CDX) logo and open index file (.IDX) numberTAGNO (return) composite index file (.CDX) identification and open index (.IDX) index file(TARGET) returns a table alias, the table is specified in the INTO clause SETRELATION command relationship goals(UNIQUE) is used to test whether the only way to establish the index(UPDATED) for testing in recent READ commands, whether the data has been modified(USED) to determine whether the specified workspace opens a tableXMLTOCURSOR (XML) convert text to VisualFoxPro cursor or table----------------------------------------------Visual FoxPro date and time functions(CTOD) the character expressions into expressions date.(CDOW) returns a value from a given week date or date time expression.(CMONTH) the name of the month returns a date or a date time expressions.(CTOD) the character expressions into expressions date.CTOT () returns a date time value from a character expression.(DATE) returned by the date of the current system operating system controls, or create a compatible with the 2000 date value.(DATETIME) to date and time value returns the current date and time, or create a 2000 compatible date time value.(DAY) to return to a given date or numeric expression date and time expressions are the first few days.(DMY) a character expression from a date or date and time expression returns a "day month year" format (for example, 31 May 1995). Not abbreviated month name.(DTOC) returned by the date or the date and time expression character date.DTOS (string) returns yyyymmdd date format from the specified date or date and time in the expression.(DTOT) the return date time value from the date.(GOMONTH) for a given date or date and time expressions expressions, before or after the date of the month returns the specified number.(HOUR) return date and time expressions part hours.MDY () returns the specified date or date and time expressions to "month day year" format, which is abbreviated month name.(MINUTE) some minutes to return to date and time in the expression of type.MONTH () returns the date or date and time expressions in thevalue.QUARTER () returns a date or date and time expressions in quarter value.(SEC) part second to return to date and time in the expression of type.(SECONDS) in seconds since midnight after the return time.SYS (1) returns the current system date to date number string.SYS (2) returned since the start of the midnight time, in seconds.SYS (10) (Julian) the date will be converted into a string.SYS (11) the date format date expressions or string converted to date (Julian).(TIME) for 24 hours, the 8 string (hours: Minutes: seconds) returns the current system date and time format.(TTOC) returns a character value from the date and time expressions.TTOD () returns a date value from the date and time.WEEK () returns a value representative of the year the first few weeks from the date or date and time expressions in expression.YEAR () returns the year from the date specified in the.Visual FoxPro character function(ALLTRIM). Delete the specified character expression spaces before and afterASC () returns the leftmost characters in a character expression value of ANSIAT (return) first appeared in another character expression or memo field of a character expression or memo field locationAT_C (return) first appeared in another character expression or memo field of a character expression or memo field locationATC (return) first appeared in another character expression or memo field of a character expression or memo field locationATCC (return) first appeared in another character expression or memo field of a character expression or memo field location(ADDBS) if necessary, add a backslash to a path expressionATCLINE () returns the line number first appeared in another character expression or memo field a character expression or memo field.ATLINE () returns the line number first appeared in another character expression or memo field a character expression ormemo field.(BETWEEN) to determine the value of an expression is in between the other two expressions of the same data type valueCHR (ANSI) according to the numerical code specified the corresponding character(CHRTRAN) will replace the first character in the expression and the second expression character matching character for the corresponding character in the third expression(CHRTRANC) will replace the first character in the expression and the second expression character matching character for the corresponding character in the third expression(CPCONVERT) the character, character expression or memo field conversion to other code page(CHRSAW) to determine whether a character appears in the keyboard buffer(CHRTRAN) in a character expression, to replace the second match the expression character for the corresponding character in the third expression(CHRTRANC) will replace the first character in the expression and the second expression character matching character for the corresponding character in the third expressionDIFFERENCE () returns an integer from 0 to 4, indicatingrelative phonetic difference between expressions of two characters(EMPTY) determines whether the expression is null(GErWORDCOUNr) count a few words in(GETWORDNUM) returns a specified word from a string(INLIST) to determine whether an expression and a set of expressions in a match. '(ISALPHA) to determine the leftmost character expression whether a character is a letter(ISBLANK) to determine whether the expression of null values(ISDIGIT) determine the character expression to the left of a character is digital (0 to 9)(ISLEADBYTE) if the first byte character expression of the first character is a byte, returns true (.T.)(ISLOWER) determine the character expression the leftmost character is lowercase letters(ISMOUSE) to determine whether the computer with mouse(ISNULL) to determine whether the NULL value calculation results(ISUPPER) to determine the first character character expression is uppercase (A ~ z)(LEFT), a character from the leftmost character expression returns a specified number of characters(LEPTC) from the beginning of a character expression of a character on the left returns a specified number of charactersLEN () returns the number of characters in a character expressionLENC () returns the number of characters in the expression to the word(LIKE) to determine whether a character expression is matched with another character expression(LIKEC) to determine whether a character expression is matched with another character expression(LOWER) returns a character expression specified in lowercase letters(LTRIM) a leading space delete character specified, and then return the resulting expression(OCCURS) the number of returns in another character in the expression of a character expression(OEMTOANSI) for a character in the string expression isconverted into the corresponding ANSI character set(PADL), PADR (), PADC () by an expression that returns a character, and from the left, right or from both sides with spaces or characters to fill to the specified length of the string(PROPER) returns a string from a character expression, each string in uppercase first letterRAT (return) first appeared in another character expression or memo field within a character expression or memo field position, from the rightmost character.(RATC) returns a character expression in another character expression or memo field last appeared in the line, from the last line.(RATLINE) line number back to a character expression or memo field in another character expression or memo field appears at the end of the last line, from the start counting.(REPUCATE) returns a string, the string is the specified character expression after repeated a specified number of times(RIGHT) from the beginning of the right string returns a specified number of charactersRIGHTC () returns the right from a specified number of characters in a string(RTRIM) delete a character expression following space after return result stringSOUNDEX (voice) returns a character expression specified representation(SPACE) returns a string consisting of the specified number of spacesSTR () returns the specified numeric expression corresponding to the character(STRCONV) the character expression into another formSTREXTRACT (two) returns a string delimiter between(STRTRAN) in the first character expression or memo field search, second character expressions or memo field, and third character expression - type or memo field replace each occurrence of the second character expressions or memo field(STUFF) returns a string,This string is obtained by the number specified by another character expression to replace the existing character expression of the characters(STUFFC) returns a string, the string is the number specified by another character expression to replace the existing character expression in character, the(SUBSTR) returns a string from a given character expression or memo field(SUBSTRC) returns a string from a given character expression or memo fieldSYS (15) to replace the characters in a stringSYS (20) German text conversion(TEXTMERGE) provide an evaluation on the expression.TRIM () returns the specified character expression after delete all suffix spaces(TXTWIDTH) according to the average width of the character font return character expression length(TYPE) calculation of character expression and returns its contents, data typeUPPER () returns uppercase character expression specified----------------------------------------------Visual FoxPro numerical functionABS (absolute value) returns the specified numeric expressionACOS () returns the arccosine specified numerical value of the expression(ASIN) anyway returns a numeric expression string value radianATAN () returns the arctangent numerical value curve(ATN2) the value of the specified value returned anyway, no limit quadrant return value(BINTOC) the integer represented by binary character.BITAND (two) returns the numeric values in the AND operation by the results(BITCLEAR) refers to a clear positioning numerical numeric (this bit set to 0), and returns the result value(BITLSHIFr) returns a numeric numerical result after moving to the left to the positionBrrNOT () returns a value of type NOT according to the numerical calculation resultsBITOR (two) returns the numeric OR operation according to the numerical results(BITRSHIFF) returns a numeric value to move right after positioning results(BITSET) will be a set value of a numeric 1 and returns the result(BITTEST) to determine the value of a numeric finger positioning is 1BITXOR (two) returns the numeric numerical XOR bitwise resultsCEILING () returns the smallest integer greater than or equal to the specified numeric expressionCOS () returns the numeric expression of Yu Xianzhi(CTOmN) will be converted to an integer type representation of binary characters(DTOR) radians(EVALUATE) to calculate the value of the expression character and returns the result(EVL) a non null value from the two expressions to returnEXP () returns the value of eAx, where x is a numeric expression of a given(FLOOR) on the numerical expression of the given value, returns the largest integer less than or equal to it.FV () returns the future value of a financial investment(INT) a numerical calculation of the value of the expression, and returns the integer part(LOG) the natural logarithm returns a numeric expression (base C)(LOGl0) the common logarithm returns a numeric expression (base 10).(MAX) on the expressions, and returns the expression with maximum value(MIN) to calculate a set of expressions, and returns with the minimum value of the expression(MOD) to remove another numeric expression with a numeric expression that returns the remainder(MTON) a numeric value returned by a currency.(NORMALIZE) to provide users with a character expression can be converted to VisualFoxPro and compared the format function return value(NTOM) returned by a numeric expression containing four decimal currency value(NVL) returns a non null value from two.(PAYMENT) the number of each payment return fixed interest loan repayPI (n) returns a numeric constant(PV) the present value of an investment return(RAND) returns a random number between 0 and 1.ROUND (return) rounded to the specified numeric expression of decimal digits(RTOD) the degree of curvature into(SIGN) when the specified numeric expression value is positive, negative or 0, respectively, 1 -1 or 0 returnSIN () returns a value of the sine angle.SQRT () returns the square root of the specified numeric expressionSYS (2007) returns a character expression check sum valueTAN () returns the value of the tangent angle(VAL) a character expression consists of digits return numeric values----------------------------------------------FTP://********************.net find the help9.chm file in the FTPThis is a function of vfp9.0 command manual contains all command function vfp.You can also join the QQ group VFP heaven:Nineteen million thirty-nine thousand one hundred andthirty-nineNineteen million six hundred and forty-four thousand six hundred and ninety-twoTwenty million one hundred and forty-nine thousand eight hundred and ninety-threeTwenty-one million seven hundred and nine thousand six hundred and twentyThe inside of the master can meet all your questions。
VisualFoxPro字符函数ALLTRIM().删除指定字符表达式的前后空格符ASC()返回字符表达式中最左边字符的ANSI值AT()返回一个字符表达式或备注字段在另一个字符表达式或备注字段中首次出现的位置AT_C()返回一个字符表达式或备注字段在另一个字符表达式或备注字段中首次出现的位置ATC()返回一个字符表达式或备注字段在另一个字符表达式或备注字段中首次出现的位置ATCC()返回一个字符表达式或备注字段在另一个字符表达式或备注字段中首次出现的位置ADDBS()如果必要,向一个路径表达式添加一个反斜杠ATCLINE()返回一个字符表达式或备注字段在另一个字符表达式或备注字段中第一次出现的行号ATLINE()返回一个字符表达式或备注字段在另一个字符表达式或备注字段中首次出现的行号BETWEEN()判断一个表达式的值是否在另外两个相同数据类型的表达式的值之间CHR()根据指定的ANSI数值代码返回其对应的字符CHRTRAN()将第一个字符表达式中与第二个表达式的字符相匹配的字符替换为第3个表达式中相应的字符CHRTRANC()将第一个字符表达式中与第二个表达式的字符相匹配的字符替换为第3个表达式中相应的字符CPCONVERT()把字符、备注字段或字符表达式转换到其他代码页CHRSAW()确定一个字符是否出现在键盘缓冲区中CHRTRAN()在一个字符表达式中,把与第二个表达式字符相匹配的字符替换为第三个表达式中相应字符CHRTRANC()将第一个字符表达式中与第二个表达式的字符相匹配的字符替换为第三个表达式中相应的字符DIFFERENCE()返回0到4间的一个整数,表示两个字符表达式间的相对语音差别EMPTY()确定表达式是否为空值GErWORDCOUNr()计数一个中中的单词数GETWORDNUM()从一个串中返回一个指定的词INLIST()判断一个表达式是否与一组表达式中的某一个相匹配'ISALPHA()判断字符表达式的最左边一个字符是否为字母ISBLANK()判断表达式是否为空值ISDIGIT()判断字符表达式的最左边一个字符是否为数字(0到9)ISLEADBYTE()如果字符表达式第一个字符的第一个字节是前导字节,则返回"真"(.T.)ISLOWER()判断字符表达式最左边的字符是否为小写字母ISMOUSE()判断计算机是否具有鼠标ISNULL()判断计算结果是否为NULL值ISUPPER()判断字符表达式的第一个字符是否为大写字母(A~z)LEFT()?从字符表达式最左边一个字符开始返回指定数目的字符LEPTC()从字符表达式最左边一个字符开始返回指定数目的字符LEN()返回字符表达式中字符的数目LENC()返回字符表达式中字待的数目LIKE()确定一个字符表达式是否与另一个字符表达式相匹配LIKEC()决定一个字符表达式是否与另一个字符表达式相匹配LOWER()以小写字母形式返回指定的字符表达式LTRIM()删除指定的字符表达式的前导空格,然后返回得到的表达式OCCURS()返回一个字符表达式在另一个字符表达式中出现的次数OEMTOANSI()用于将字符串表达式中的字符转换成与其相对应的ANSI字符集中的字符PADL()、PADR()、PADC()由一个表达式返回一个字符中,并从左边,右边或同时从两边用空格或字符把该字符串填充到指定长度PROPER()从字符表达式中返回一个字符串,字符串中的每个首字母大写RAT()返回一个字符表达式或备注字段在另一个字符表达式或备注字段内第一次出现的位置,从最右边的字符算起RATC()返回一个字符表达式在另-个字符表达式或备注字段最后一次出现所在的行号,从最后-行算起RATLINE()回一个字符表达式或备注字段在另一个字符表达式或备注字段中最后出现的行号,从最后一行开始计数。