Unit 'pascodegen' Package
[Overview][Constants][Types][Classes][Index] [#fcl]

TPascalCodeGenerator.EnsureSection

Ensure code is in specified section

Declaration

Source position: pascodegen.pp line 80

public procedure TPascalCodeGenerator.EnsureSection(

  aSection: TCodeSection

);

Arguments

aSection

  

Section type to ensure

Description

EnsureSection ensures that the current code section is set to the specified section type. If the current section is different from the requested section, it outputs the appropriate section keyword (Const, Type, Var, Resourcestring) and updates the current section.

See also

TCodeSection

  

Pascal code section types

TPascalCodeGenerator.CurrentSection

  

Current code section type


Documentation generated on: Dec 19 2025