VB程序学习代码记录20160718(2)
来源:互联网 发布:满秩矩阵一定是方阵吗 编辑:程序博客网 时间:2024/05/21 06:17
abs函数
private sub form_click() print abs(50.3) print abs(-50.3)end sub
exp函数
Private Sub Form_Click() Dim myangle, myhsin myangle = 1.3 myhsin = (Exp(myangle) - Exp(-1 * myangle)) / 2 Print myhsinEnd Sub
sgn函数:指出参数的正负号
Private Sub form_click() Dim myvar1, myvar2, myvar3 myvar1 = 28: myvar2 = -24: myvar3 = 0 Print Sgn(myvar1) Print Sgn(myvar2) Print Sgn(myvar3)End Sub
sqr函数(平方根)
Private Sub form_click() Print Sqr(4)End Sub
len函数
Private Sub form_click() Print Len("mystring")End Sub
left、right、mid函数
Private Sub form_click() Print Left("changchun university", 2) Print Left("changchun university", 12) Print Right("changchun university", 2) Print Right("changchun university", 6) Print Mid("changchun university", 1, 3) Print Mid("changchun university", 3, 3)End Sub
trim、ltrim、rtrim函数
Private Sub form_click() Print Trim(" abcdefg ") Print LTrim(" abcdefg ") Print RTrim(" abcdefg ")End Sub
asc函数
Private Sub form_click() Print Asc("A") Print Asc("b") Print Asc("Apple")End Sub
chr函数
Private Sub form_click() Print Chr(65) Print Chr(97) Print Chr(62)End Sub
val函数
Private Sub form_click() Print Val("2457") Print Val("_2_45_7") Print Val("24 and 57")End Sub
str函数
Private Sub form_click() Print Str(256) Print Str(-136.25) Print Str(432.01)End Sub
0 0
- VB程序学习代码记录20160718(2)
- VB程序学习代码记录20160718
- VB程序学习代码记录20160722(2)
- VB程序学习代码记录20160723(2)
- VB程序学习代码记录20160711
- VB程序学习代码记录20160713
- VB程序学习代码记录20160714
- VB程序学习代码记录20160715
- VB程序学习代码记录20160717
- VB程序学习代码记录20160719
- VB程序学习代码记录20160721
- VB程序学习代码记录20160722
- VB程序学习代码记录20160723
- VB程序学习代码记录20160724
- VB程序学习代码记录20160725
- VB程序学习代码记录20160726
- VB程序学习代码记录20160729
- VB程序学习代码记录20160730
- 简单实现文件上传(php)(小学生日常)
- ASP.NET的三种开发模式
- [51nod1647]小Z的trie
- jQuery中:first和:first-child的区别
- 6款开源中间件
- VB程序学习代码记录20160718(2)
- 如何避免野指针
- 表头不动的表格
- Play on Words(欧拉回路+并查集)
- 编程中无穷大常量的设定技巧【0x3f3f3f3f】
- 迷のA+B problem
- %x
- 文章标题
- Java基础之理解Annotation