ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Miscellaneous WINDEV functions
  • Properties specific to WLanguageCodeFormatting variables
  • WLanguage functions that use WLanguageCodeFormatting variables
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
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.
Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
// Chaîne à mettre en forme
sCode is string ANSI = "
MiseEnFormeCode est un CodeWLangageMiseEnForme
MiseEnFormeCode.Langue = langueFrançais
MiseEnFormeCode.Indentation = Vrai
MiseEnFormeCode.InclureDéclarationsCSS = Vrai
MiseEnFormeCode.IgnoreErreurCompilation = Vrai
MiseEnFormeCode.CasseMotsClés = codeWLangageMotsClésMinuscule
MiseEnFormeCode.Thème = codeWLangageThèmeSombre
MiseEnFormeCode.Format = codeWLangageFormatHTML
bufResHTML est un buffer = MiseEnFormeCode.MetEnForme(sCode)
"
MiseEnFormeCode is WLanguageCodeFormatting
MiseEnFormeCode.Language = languageFrench
MiseEnFormeCode.Indentation = True
MiseEnFormeCode.IncludeCSSDeclarations = True
MiseEnFormeCode.IgnoreCompilationError = True
MiseEnFormeCode.KeywordCase = WLanguageCodeKeywordLowercase
MiseEnFormeCode.Theme = WLanguageCodeThemeDark
MiseEnFormeCode.Format = WLanguageCodeFormatHTML
bufResHTML is Buffer = WLanguageCodeFormat(MiseEnFormeCode, sCode)

// Affichage dans un champ d'affichage HTML
HTM_SansNom1 = UTF8ToString(bufResHTML)
Properties

Properties specific to WLanguageCodeFormatting variables

The following properties can be used to handle the WLanguage code formatting options:
Property nameType usedEffect
KeywordCaseInteger constantUppercase or lowercase characters to be used for keywords:
  • codeWLanguageKeywordsShift: Keywords are capitalized.
  • codeWLanguageKeywordsLowercase: Keywords are lowercase.
CompilationWLanguageCodeCompiling variableCompilation options (allowed functions, forbidden functions, etc.).
FormatInteger constantCode format:
  • codeWLanguageFormatTexte (Default value): Plain text.
  • codeWLanguageFormatHTML Text in HTML format.
IgnoreCompilationErrorBoolean
  • True to ignore compilation errors. Formatting and syntax highlighting will be less accurate.
  • False (default value) otherwise.
IncludeCSSDeclarationsBoolean
  • 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.
IndentationBoolean
  • True to enable indentation,
  • False (default) to disable indentation.
LanguageInteger constantLanguage of code to be generated:
  • 0 (default): no translation, code remains in the language used.
  • langueFrançais: the code is translated into French.
  • languageEnglish: the code is translated into English.
Note: Only keywords, variable types, functions and properties are translated.
ThemeInteger constantTheme used for syntax highlighting:
  • codeWLanguageClear theme: Use of the clear theme.
  • codeWLanguageGray theme: Use of the gray theme.
  • codeWLanguageDarkTheme: Using the dark theme.
Remarks

WLanguage functions that use WLanguageCodeFormatting variables

WLanguageCodeFormatting variables can be handled using the following WLanguage functions:
WLanguageCodeFormatFormats WLanguage code: coloring, normalized rewriting, indentation, translation, etc.
Minimum version required
  • Version 2024
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help