Actions
Bug #161
openReindent a nested case get indented wrong
Status:
Resolved
Priority:
Normal
Assignee:
-
Start date:
07/12/2019
Due date:
% Done:
0%
Estimated time:
Description
Reported by Jose in forum thread:
https://support.dataaccess.com/Forums/showthread.php?64609-DFRefactor-20190426-Reindent-function-mess-up-my-file
I have seen the following:
Procedure MyProcedure
Case Begin
Case (1 = 1)
Case Begin
Case (2 = 2)
If (3 = 3) Begin
Showln "test"
End
Case Break
Case End
Case Break
Case End
End_Procedure
Is refactored to:
Procedure MyProcedure
Case Begin
Case (1 = 1)
Case Begin
Case (2 = 2)
If (3 = 3) Begin
Showln "test"
End
Case Break
Case End
Case Break
Case End
End_Procedure
Files
Updated by Wil van Antwerpen over 6 years ago
As I cannot edit the report.
This was the result:
Is refactored to:
Procedure MyProcedure
Case Begin
Case (1 = 1)
Case Begin
Case (2 = 2)
If (3 = 3) Begin
Showln "test"
End
Case Break
Case End
Case Break
Case End
End_Procedure
Updated by Wil van Antwerpen about 6 years ago
This is fixed in SciControlLib library rev. 59
Here's an example of reindented code with the latest logic - after it was reindented.
Object oTest Is a BusinessProcess
Procedure OnProcess
String sAnimal sSex sTerm sNoise sCatch sDo
Case Begin
Case (sAnimal = "Cat")
Move ("Meow") to sNoise
Case Begin
Case (sSex="male")
Move "tomcat" to sTerm
Case Begin
Case (sCatch="mouse")
Move "eat" to sDo
Case Break
Case (sCatch="bird")
Move "kill" to sDo
Case Break
Case End
Case Break
Case (sSex="female")
Move "female cat" to sTerm
Case Break
Case End
Case Break
Case (sAnimal = "Dog")
Move ("Arf") to sNoise
Case Break
Case Else
Move ("") to sNoise
Case End
End_Procedure
End_Object
Updated by Wil van Antwerpen about 6 years ago
- Status changed from New to Resolved
Actions