Hi Bengt,

The issue with the nested case statements has been resolved.

I tested with a small extension to your original example and after running re-indent it now looks like so:

Code:
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
The update is available from the files section of the project server.
https://projects.vdf-guidance.com/pr...refactor/files

--
Wil