- 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
您可能关注的文档
- java封包数据(国外英语资料).doc
- Java作业一(国外英语资料).doc
- java泛型分析(国外英语资料).doc
- Java瀛^范璁板綍(国外英语资料).doc
- java的static修饰符 详解(国外英语资料).doc
- java转义字符(国外英语资料).doc
- java选择题练习附答案(国外英语资料).doc
- jdsk(国外英语资料).doc
- Java之父(国外英语资料).doc
- JS防水涂料施工工艺2(国外英语资料).doc
- 2023-2024学年广东省深圳市龙岗区高二(上)期末物理试卷(含答案).pdf
- 2023-2024学年贵州省贵阳市普通中学高一(下)期末物理试卷(含答案).pdf
- 21.《大自然的声音》课件(共45张PPT).pptx
- 2023年江西省吉安市吉安县小升初数学试卷(含答案).pdf
- 2024-2025学年广东省清远市九校联考高一(上)期中物理试卷(含答案).pdf
- 广东省珠海市六校联考2024-2025学年高二上学期11月期中考试语文试题.pdf
- 2024-2025学年语文六年级上册第4单元-单元素养测试(含答案).pdf
- 2024-2025学年重庆八中高三(上)月考物理试卷(10月份)(含答案).pdf
- 安徽省安庆市潜山市北片学校联考2024-2025学年七年级上学期期中生物学试题(含答案).pdf
- 贵州省部分校2024-2025学年九年级上学期期中联考数学试题(含答案).pdf
文档评论(0)