Modify ↓
Opened 14 years ago
Closed 14 years ago
#2102 closed Bug (Duplicate)
error using ContinueLoop
| Reported by: | anonymous | Owned by: | |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.3.8.0 | Severity: | None |
| Keywords: | Cc: |
Description
When using code like
For $i = 1 To 10 If $i = 3 Then ContinueLoop Next
I receive an error
"ContinueLoop" statement with no matching "While", "Do" or "For" statement.: If $i = 3 Then ContinueLoop
Full example of code.
$File = FileOpenDialog('Choose 1st file', @ScriptDir, '(*.txt;*.xml)|(*)')
If @error Then Exit
$List = FileOpenDialog('Choose 2nd file', @ScriptDir, '(*.txt;*.xml)|(*)')
If @error Then Exit
$Out = FileGetName($File) & '.fixed.' & FileGetExtension($File)
_FileReadToArray($File, $File)
_FileReadToArray($List, $List)
For $i = 1 To $File[0]
For $j = 1 To $List[0]
If $File[$i] = $List[$j] Then ContinueLoop 2
Next
FileWriteLine($Out, $File[$i])
Next
Attachments (0)
Change History (4)
comment:1 by , 14 years ago
comment:4 by , 14 years ago
| Resolution: | → Duplicate |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.

For the last example I forget to paste defined functions.