- 1、本文档共19页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 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
您可能关注的文档
最近下载
- 2024年湖南水利水电职业技术学院单招职业技能测试题库含答案(研优卷).docx VIP
- 教育、科技、人才一体化视域下发展新质生产力的四重逻辑和实践路径.docx VIP
- 教育、科技、人才一体化视域下发展新质生产力的四重逻辑和实践路径.docx VIP
- 教育、科技、人才一体化与新质生产力发展.pptx VIP
- 《大棚番茄基质槽式栽培技术规程》.docx
- 立体车库 毕业论文外文翻译.docx VIP
- 教育、科技、人才一体推进新质生产力发展.docx VIP
- 2024年湖南水利水电职业技术学院单招职业技能测试题库含答案(考试直接用).docx VIP
- 社交礼仪教程(第7版 微课版)课件 第五章 餐饮礼仪.pptx
- 2025清华:DeepSeek从入门到精通.pdf
文档评论(0)