|
|
|
|
- Properties specific to WLanguageCodeFormatting variables
- WLanguage functions that use WLanguageCodeFormatting variables
WLanguageCodeFormatting (Variable type) In french: CodeWLangageMiseEnForme
The WLanguageCodeFormatting type is used to define all the WLanguage code formatting options. These options can be defined and changed using different WLanguage properties. Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
sCode is ANSI string = "
CodeFormatting is WLanguageCodeFormatting
CodeFormatting.Language = languageEnglish
CodeFormatting.Indentation = True
CodeFormatting.IncludeCSSDeclarations = True
CodeFormatting.IgnoreCompilationError = True
CodeFormatting.KeywordCase = WLanguageCodeKeywordLowercase
CodeFormatting.Theme = WLanguageCodeThemeDark
CodeFormatting.Format = WLanguageCodeFormatHTML
bufHTMLRes is Buffer = CodeFormatting.Format(sCode)
"
CodeFormatting is WLanguageCodeFormatting
CodeFormatting.Language = languageEnglish
CodeFormatting.Indentation = True
CodeFormatting.IncludeCSSDeclarations = True
CodeFormatting.IgnoreCompilationError = True
CodeFormatting.KeywordCase = WLanguageCodeKeywordLowercase
CodeFormatting.Theme = WLanguageCodeThemeDark
CodeFormatting.Format = WLanguageCodeFormatHTML
bufHTMLRes is Buffer = WLanguageCodeFormatting(CodeFormatting, sCode)
HTM_NoName1 = UTF8ToString(bufHTMLRes)
Properties Properties specific to WLanguageCodeFormatting variables The following properties can be used to handle the WLanguage code formatting options: | | | Property name | Type used | Effect |
---|
KeywordCase | Integer constant | Uppercase or lowercase characters to be used for keywords: - WLanguageCodeKeywordUppercase: Keywords are in uppercase.
- WLanguageCodeKeywordLowercase: Keywords are in lowercase.
| Compilation | WLanguageCodeCompiling variable | Compilation options (allowed functions, forbidden functions, etc.). | Format | Integer constant | Code format:- WLanguageCodeFormatText (Default value): Simple text.
- WLanguageCodeFormatHTML: Text in HTML format.
| IgnoreCompilationError | Boolean | - True to ignore compilation errors. Formatting and syntax highlighting will be less accurate.
- False (default value) otherwise.
| IncludeCSSDeclarations | Boolean | - True (default) to include the CSS declarations required for formatting and highlighting in the formatted code. This property is taken into account only if the Format property is set to WLanguageCodeFormatHTML.
- False not to include CSS declarations. In this case, you can get them using WLanguageCodeGetCSSDeclarations.
| Indentation | Boolean | - True to enable indentation,
- False (default) to disable indentation.
| Language | Integer constant | Language of code to be generated: - 0 (Default value): no translation, the code remains in its current language.
- languageFrench: the code is translated into French.
- languageEnglish: the code is translated into English.
Remark: Only keywords, variable types, functions and properties are translated. | Theme | Integer constant | Theme used for syntax highlighting: - WLanguageCodeThemeLight: Light theme is used.
- WLanguageCodeThemeGray: Gray theme is used.
- WLanguageCodeThemeDark: Dark theme is used.
|
Remarks WLanguage functions that use WLanguageCodeFormatting variables WLanguageCodeFormatting variables can be handled using the following WLanguage functions:
| | | Applies formatting to WLanguage code: syntax highlighting, style standardization, indentation, translation, etc. |
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|