errhand.bas
来自「HP GPIB的VB和C语言库文件,参考范例.」· BAS 代码 · 共 28 行
BAS
28 行
' errhand.bas
Sub Main ()
Dim dvm As Integer
Dim res As Double
On Error GoTo ErrorHandler
dvm = iopen("hpib7,16")
Call itimeout(dvm, 10000)
argcount = ivprintf(dvm, "MEAS:VOLT:DC?" + Chr$(10))
argcount = ivscanf(dvm, "%lf", res)
MsgBox "Result is " + Format(res)
iclose (dvm)
' Tell SICL to cleanup for this task
Call siclcleanup
End
ErrorHandler:
' Display the error message
MsgBox "*** Error : " + Error$, MB_ICON_EXCLAMATION
' Tell SICL to cleanup for this task
Call siclcleanup
End
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?