![]() |
新闻 | 体育 | 财经 | 娱乐 | 商业 | 科技 | 汽车 | 数码 | 女人 | 旅游 | 教育 | 文化 | 广州 | 军事 | 部落 评论 | NBA | 明星 | 证券 | 基金 | 探索 | 房产 | 手机 | 两性 | 健康 | 培训 | 电影 | 游戏 | 拍卖 | 论坛 |
![]() |
·工具软件·办公软件·操作系统·图形图像·网站建设·编程开发·多媒体·网络·病毒 |
| ·学院首页·精选专题·艺术设计·电子杂志·教授视点·教授名录·软件新闻·论坛 |
编程人员从大量的程序开发中积累了许多非常实用的经验与技巧,它们就象一盘盘的快餐,看似简单但营养绝对丰富!用“餐”之后,您的VB程序将立即超频。还犹豫什么,快来品尝品尝吧 ...
res = ""
For i = 1 to 10000: res = res & Str(i):
NextDim res As String
Dim i As Long
Dim index As Long
’预留足够长的缓冲空间
res = Space(90000)
’指针变量,指出在哪里插入字符串
index = 1
’循环开始
For i = 1 to 10000
substr = Str(i)
length = Len(substr)
’填充字符串的相应区间段数值
Mid$(res, index, length) = substr
’调整指针变量
index = index + length
Next
’删除多余字符
res = Left$(res, index - 1)Dim col As New Collection, i As Long
For i = 1 To 10000
col.Add i, CStr(i)
NextFor i = col.Count To 1 Step -1
col.Remove i
NextFor i = 1 To col.Count Step 1
col.Remove i
NextSet col = New CollectionIf UCase$(char) = "A" Or UCase$(char) = "E" Or UCase$(char) = "I" Or UCase$(char) = "O" Or UCase$(char) = "U" Then
’ it is a vowel
End If If InStr("AaEeIiOoUu", char) Then
’ it is a vowel
End IfIf LCase$(word) = "winter" Or LCase$(word) = "spring" Or LCase$(word) = _ "summer" Or LCase$(word) = "fall" Then
’ it is a season’s name
End If If Instr(";winter;spring;summer;fall;", ";" & word & ";") Then
’ it is a season’s name
End IfSelect Case LCase$(word)
Case "zero"
result = 0
Case "one"
result = 1
Case "two"
result = 2
Case "three"
result = 3
Case "four"
result = 4
Case "five"
result = 5
Case "six"
result = 6
Case "seven"
result = 7
Case "eight"
result = 8
Case "nine"
result = 9
End Selectresult = InStr(";zero;;one;;;two;;;three;four;;five;;six;;;seven;eight;nine;", _
";" & LCase$(word) & ";") \ 6If SomeVar > SomeOtherVar Then
BoolVal = True
Else
BoolVal = False
End If BoolVal = (SomeVar > SomeOtherVar) If SomeVar > SomeOtherVar Then
x = x + 1
End Ifx = x - (SomeVar > SomeOtherVar) Function Max(arr() As Long) As Long
Dim res As Long, i As Long
res = arr(LBound(arr))
For i = LBound(arr) + 1 To UBound(arr)
If arr(i) > res Then res = arr(i)
Next
Max = res
End Function Function Max(arr() As Long) As Long
Dim i As Long
Max = arr(LBound(arr))
For i = LBound(arr) + 1 To UBound(arr)
If arr(i) > Max Then Max = arr(i)
Next
End Function
推荐文章: