Modify

Opened 18 years ago

Closed 18 years ago

Last modified 18 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 by Jos, 18 years ago

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 by Jos, 18 years ago

Resolution: Fixed
Status: newclosed

Fixed in tidy v2.0.23.15

Jos

comment:3 by TicketCleanup, 18 years ago

Milestone: Future Release

Automatic ticket cleanup.

in reply to:  1 comment:4 by Hubertus72, 18 years ago

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

Modify Ticket

Action
as closed The owner will remain Jos.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.