Skip to content

TPascalCodeGenerator.SimpleMethodBody

Generate simple method body

Declaration

Source position: pascodegen.pp line 100

public 
procedure TPascalCodeGenerator.SimpleMethodBody
                                               (Lines: Array of string = string)
                                               ;  virtual;

Description

SimpleMethodBody generates a complete method body with begin/end block and proper indentation. It adds an empty line, then 'begin', indents and adds the provided lines, undents and adds 'end;', followed by another empty line.

See also

Name Description
TPascalCodeGenerator.AddLn Add line to source code with current indentation
TPascalCodeGenerator.Indent Increase indentation level
TPascalCodeGenerator.Undent Decrease indentation level