我在源代码中看到 "DIM Temp% " 这个"Temp%" 是什么意思啊???请教

yangj1976 2002-08-23 10:09:56
该函数代码

Option Explicit
Public exitPause As Boolean


Public Function timedPause(secs As Long)
Dim secStart As Variant
Dim secNow As Variant
Dim secDiff As Variant
Dim Temp%

exitPause = False 'this is our early way out out of the pause

secStart = Format(Now(), "mm/dd/yyyy hh:nn:ss AM/PM") 'get the starting seconds



Do While secDiff < secs
If exitPause = True Then Exit Do
secNow = Format(Now(), "mm/dd/yyyy hh:nn:ss AM/PM") 'this is the current time and Date at any itteration of the Loop
secDiff = DateDiff("s", secStart, secNow) 'this compares the start time With the current time
Temp% = DoEvents
Loop
End Function

...全文
310 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
cxa_2002 2002-08-24
  • 打赏
  • 举报
回复
Dim Temp% 就等价于 dim temp as integer
在声明变量时使用类型后缀是一个即快捷又方便的方法,而且类型后缀在变量名中加入了关于变量类型的信息。
temp%,后缀%是integer类型的后缀

同样,Dim aa As string 可以写成:dim aa$
liu_swallow 2002-08-24
  • 打赏
  • 举报
回复
为什么要Temp% = DoEvents
而不是doevent
射天狼 2002-08-24
  • 打赏
  • 举报
回复
楼上说的对!
zyl910 2002-08-24
  • 打赏
  • 举报
回复
%整形
&长整形
@货币型
!单精度浮点型
#双精度浮点型
$字符串

7,785

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧