Modify

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#327 closed Bug (Fixed)

SciTE/Tidy bug. False message: "endfunc" is closing previous "if"

Reported by: Hubertus72 Owned by: Jos
Milestone: Future Release Component: SciTE4AutoIt
Version: 3.2.12.0 Severity: None
Keywords: Tidy message "endfunc" is closing previous "if" Cc:

Description

There is a Tidy bug in _ITE function: Error -> "endfunc" is closing previous "if"
but the function is running fine.

Local $n1 = 1, $n2
$t = "Steps" & @TAB & "Variants" & @TAB & @TAB & @TAB & @TAB & "Steps" & @TAB & "Variants" & @TAB & @LF & @LF
For $i = 1 To 91
	$n0 = $n1
	$n1 += $n2
	$n2 = $n0
	$t &= $i & @TAB & StringFormat("%-20.0f", $n1) & _ITE(Mod($i, 2), @TAB & @TAB & _ITE($i < 54, @TAB, ""), @LF)
Next
MsgBox(0, "The steps enigma", $t)

Func _ITE($if, $then = 1, $else = 0)
	If $if Then Return $then
		Return $else
;### Tidy Error -> "endfunc" is closing previous "if"
	EndFunc   ;==>_ITE

Attachments (0)

Change History (4)

comment:1 follow-up: Changed 16 years ago by Jos

You are good in finding the famous needle in the haystack :)
The error is triggered because the line ends with "then". I can change the test to " then".

Jos

comment:2 Changed 16 years ago by Jos

  • Resolution set to Fixed
  • Status changed from new to closed

Fixed in tidy v2.0.23.15

Jos

comment:3 Changed 16 years ago by TicketCleanup

  • Milestone set to Future Release

Automatic ticket cleanup.

comment:4 in reply to: ↑ 1 Changed 16 years ago by Hubertus72

Replying to Jos:

You are good in finding the famous needle in the haystack :)
The error is triggered because the line ends with "then". I can change the test to " then".

Jos

I'll try to find more needles, if they don't hurt you :)
I'm sorry to spoil your time. ;-)
Hubertus

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The owner will remain Jos.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.