Escape Pascal keyword if needed
Source position: pascodegen.pp line 88
public function TPascalCodeGenerator.EscapeKeyWord( |
const S: string; |
ForceAmpersand: Boolean = False |
):string; virtual; |
S |
|
String to escape |
ForceAmpersand |
|
Force ampersand prefix instead of configured prefix/suffix |
Escaped string
EscapeKeyWord escapes a string if it is a Pascal keyword by adding prefix and suffix characters. If the string is a keyword, it adds the configured TPascalCodeGenerator.KeywordPrefix and TPascalCodeGenerator.KeywordSuffix or an ampersand (&) if ForceAmpersand is True.
|
Check if string is Pascal keyword |
|
|
Prefix for escaped keywords |
|
|
Suffix for escaped keywords |