<< Prev        Next >>

ID : 110

Resume

Function

To end the error processing routine and then execution is resumed from the specified line.

Syntax

Resume processing

Guaranteed entry

Processing
When this is not designated: The line where the error occurs is executed.
When “Next” is designated: The next line after the line where the error occurs is executed.
When “Label name” is designated: The line designated by “Label name” is executed.

Description

To end the error processing routine and then execution is resumed from the line specified by processing.

This is only available for error processing routine.

"On Error Resume Next" can be used in combination with an On Error statement. Refer to "On Error."

Attention

-

Example

'!TITLE "DENSO Robot Program"
Sub Sample_Resume

  On Error GoTo LABEL1

  Dim aaa As Integer
  Dim bbb As Integer

  aaa = 0

  ' Move to LABEL1 because an error occurs due to 0 subtraction
  bbb = 10 / aaa

  ' Display 10 on the message output window
  PrintDbg bbb

  Exit Sub

LABEL1:

  aaa = aaa + 1

  Resume

End Sub

ID : 110

<< Prev        Next >>