TOTVS Technology

Child pages
  • Horizontal Spaces and Positions
Skip to end of metadata
Go to start of metadata

The content belonging to one function must be in the same line that the function. The content of a "if" must have a tabulation (we suggest the tabulation to have 4 spaces) more distant than the beginning of the "if" row, and son on.

 // HorizontalPositionAndSpace.prw
Function HorizontalPositionAndSpace()
Local cVar1:= ""
Local nVar2 := 0
Local nCount := 1
If Empty(cVar1)
    ConOut("cVar1 está vazia.")
    If nVar2 == 0
        ConOut("nVar2 é zero.")
For nCount := 1 To 10
    ConOut("nCount: " + AllTrim(Str(nCount)))
Next nCount
Begin Sequence
    // Do something
End Sequence

This separation, as well as the vertical formatting, will give you a clear view of what belongs to who.

  • No labels