- 1、本文档共22页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
FOXPRO常用函数(国外英文资料)
FOXPRO常用函数(国外英文资料)
Numeric conversion character (STR ())
[date: 2005-09-17] source: the author of the course of shrimp union: unknown [font: large medium small]
Numeric conversion character function (STR ())
Returns a character that corresponds to a given numeric expression.
Grammar:
STR (numerical expression [length [, decimal number]])
The type of the return value
character
Parameters:
Numerical expression: a numeric expression that is converted to a character.
Length: the length of the character after the transformation. The length is the sum of the decimal points and the number of characters on the right-hand side of the decimal point.
If the length is greater than the required length, automatically fill in the blanks in the front.
If the specified length is less than the required length, a string of star (*) is returned, indicating the value overflow.
If the length is omitted, the default length is 10.
Decimal number: specifies the number of decimal digits in the return string.
If the specified number is less than the actual number, the return value is rounded.
If the number of specified digits is greater than the actual number, then 0 is added.
If the decimal number is omitted, the default is 0.
In the case of specifies the decimal digits, such as specified length (the second parameter) is less than the total length, but greater than integer length, return the decimal part made rounded characters.
Remark:
Returns the value of the number of looks, but its data type has changed, is no longer a numeric value, also is cannot be used for addition, subtraction, multiplication, and division of arithmetic operations, but can be add and subtract and character. Such as:
? quarter + 1
Its going to go wrong because a character cannot be added to a number. Write this as follows:
? quarter + STR (1, 1)
The result is:
Quarter 1
Note that you must specify the length here, otherwise the default length is 10, and the following results appear:
Quarter 1
What if I dont know how m
文档评论(0)