Jump to content

For .. Next - exiting loop


Go to solution Solved by guinness,

Recommended Posts

Posted

Does it matter if it is irrelevant how the ends / goes out of the loop ?

Specifically in this case.

Example()

Func Example()
    For $i = 1 To 10
        If $i = 5 Then Return
    Next
EndFunc   ;==>Example

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

  • Solution
Posted

The question really is what do you want to do when you've found what you're looking for? Do you need to format/parse/calculate? If no then just return.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...