mapbasi 错误处理示例.mb
来自「很多的MAPINFO的常见问题下载后可以学习很有帮助」· MB 代码 · 共 32 行
MB
32 行
'*************************************************************************
'* The following is an example of how to correctly set up multiple
'* error checking routines.
'*************************************************************************
Include "mapbasic.def"
Declare Sub Main
Sub Main
Onerror Goto Notfound 'If error run error message
Open Table "C:\fred"
Note "No error on first try"
Nexterrorcheck:
Onerror Goto Nextnotfound
Open Table "C:\Barney"
Note "No error on second try"
Exit Sub
'******* Error Routines ********
Notfound:
Note "First table not found"
Resume Nexterrorcheck 'Return and Continue program
Nextnotfound:
Note "Second table not found"
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?