vb6.0函数和语句(国外英语资料).doc

  1. 1、本文档共19页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
vb6.0函数和语句(国外英语资料)

vb6.0函数和语句(国外英语资料) First, Val function Returns the number contained in the string, which is an appropriate numeric value in the string. grammar Val (string) The necessary string parameter can be any valid string expression Explain The Val function stops reading the string on the first character that it cannot recognize as digits. Who is considered to be a part of the numerical symbols and characters, such as the horn and commas, are not recognized. However, functions can identify carry symbols O (octal) and H (sixteen hex). The blanks, tabs, and newline characters are removed from the parameter. The following return value is 1615198: Val (1615, 198th, N.E., Street) In the following code, Val returns the decimal value -1 for the sixteen - digit value shown. Val (HFFFF) Note that the Val function will be a period (.) as a valid decimal separator. When using different decimal separators, such as in international applications, CDbl is used to convert strings into numbers. ===================================== Example of Val function This example uses the Val function to return the values contained in the string. Dim MyValue MyValue = Val (2457) returns 2457. MyValue = Val (2457) returns 2457. MyValue = Val (24, and 57) returns 24. Reference: MSDN VB reference Two, Str function Returns the Variant (String) representing a value. grammar Str (number) The necessary number parameter is a Long, which can contain any valid numeric expressions. Explain When a number is converted into a string, an empty number is always reserved to indicate the positive and negative. If number is positive, the returned string contains a leading space that is a plus. Using the Format function, you can convert values into necessary formats, such as date, time, currency, or other user - defined formats. Unlike Str, the Format function does not contain a leading space to place the numbers plus sign. Be careful The Str function only as a period (.) as a valid decimal point. If you use different decim

文档评论(0)

jgx3536 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:6111134150000003

1亿VIP精品文档

相关文档