|
|
|
|
|
- Disabling JITc
- Optimizing the external calls
- Use of the constant ForceDestructorNonDynamicObject constant to force destruction of non-dynamic objects
- Error management
ExecutionMode (Function) In french: ModeExécution Allows you to: - find out and/or modify the behavior of the application or site when some errors are generated. Depending on the selected runtime mode, these errors can be ignored or they can generate some error messages. In some cases, the ExecutionMode function can be used to restore the behavior of previous versions.
- optimize the calls to the functions declared externally. Used to optimize the runtime speed of the application in 2 cases:
- Procedures declared externally
- Codes compiled dynamically, call to a global or local procedure of the project.
- find out and/or modify how the JITc is used by the application. The application uses JITc by default. It can only be disabled.
- find out and/or modify the management mode of low references for all the instantiated objects.
IF InTestMode() = True THEN
ExecutionMode(NormalMode)
ELSE
ExecutionMode(PermissiveMode)
END
Syntax <Result>: Combination of Integer constants Current runtime mode of application or site: | | DisableOptimizedAnsiUnicodeConversion | Starting with version 29 Update 3, an optimized Ansi/Unicode conversion has been implemented to speed up operations that manipulate Ansi and Unicode strings. This new method also reduces potential lost characters when converting data from one charset to another. This constant is used to restore previous operation (especially in the event of an "Internal error during optimized Ansi/Unicode conversion" type error). | DisableOptimizedExecution | JITc (Just In Time compilation) is disabled. | ExternalCallsOptimized | Optimizes the management of external calls to procedures. This parameter is associated with one of the two following constants.
| ForceDestructorNonDynamicObject | Forces the destruction of non-dynamic objects (even if a strong reference was taken). | modeFormerOperatingModeDuration | The Duration properties keep the operating mode used in version 12. | NormalMode | The errors that occurred generate error messages. | PermissiveMode | The errors that occurred are ignored (WINDEV 5.5 or WEBDEV 1.5 mode). |
Modifying the current runtime mode Hide the details
<Result> = ExecutionMode(<New runtime mode>)
<Result>: Integer constant Runtime mode of application or site after modification. | | DisableOptimizedAnsiUnicodeConversion | Starting with version 29 Update 3, an optimized Ansi/Unicode conversion has been implemented to speed up operations that manipulate Ansi and Unicode strings. This new method also reduces potential lost characters when converting data from one charset to another. This constant is used to restore previous operation (especially in the event of an "Internal error during optimized Ansi/Unicode conversion" type error). | DisableOptimizedExecution | JITc (Just In Time compilation) is disabled. | ExternalCallsOptimized | Optimizes the management of external calls to procedures. This parameter is associated with one of the two following constants.
| ForceDestructorNonDynamicObject | Forces the destruction of non-dynamic objects (even if a strong reference was taken). | modeFormerOperatingModeDuration | The Duration properties keep the operating mode used in version 12. | NormalMode | The errors that occurred generate error messages. | PermissiveMode | The errors that occurred are ignored (WINDEV 5.5 or WEBDEV 1.5 mode). |
<New runtime mode>: Integer constant New runtime mode to apply. | | DisableOptimizedAnsiUnicodeConversion | Starting with version 29 Update 3, an optimized Ansi/Unicode conversion has been implemented to speed up operations that manipulate Ansi and Unicode strings. This new method also reduces potential lost characters when converting data from one charset to another. This constant is used to restore previous operation (especially in the event of an "Internal error during optimized Ansi/Unicode conversion" type error). | DisableOptimizedExecution | Disables JITc (Just In Time compilation). | ExternalCallsOptimized | Optimizes the management of external calls to procedures. This parameter is associated with one of the two following constants.
| ForceDestructorNonDynamicObject | Forces the take of low reference for all the objects. | modeFormerOperatingModeDuration | The Duration properties keep the operating mode used in version 12. | NormalMode | The errors that occurred generate error messages. | PermissiveMode | The errors that occurred are ignored (WINDEV 5.5 or WEBDEV 1.5 mode) |
Remarks Optimizing the external calls Attention: When a project is migrated from version 5.5, permissive mode has been automatically added during migration in the project initialization code.. The following line of code allows you to take into account the optimization of external calls: ExecutionMode(PermissiveMode + ExternalCallsOptimized)
Use of the constant ForceDestructorNonDynamicObject constant to force destruction of non-dynamic objects Warning: When using the constantForceDestructorNonDynamicObject constant to force destruction of non-dynamic objects, the setting applies to all class instances in the application. In the case of an existing project, the effects can be numerous and the change of mode requires a complete validation of the application. It is advisable to intervene on release management (weak/strong reference capture) at the level of each class, rather than globally for the project.. For more details, see Advanced management of class instances. The table below presents the behavior of the application according to the errors that occurred: | | | Error case | PermissiveMode | NormalMode |
---|
Reading an index outside the range of a Table, List Box or Combo Box control.Examples: s = ListA[-1] n = ListB[56]..Color | The program returns '0' or an empty string ("") depending on the property used. | A runtime error is displayed. Example: "Invalid index: [-1]" | Writing to a negative index of a List Box, Table or Combo Box control. | The line of code is ignored | A runtime error is displayed. Example: "Invalid index: [-1]" | Writing to a large index of a List Box, Table or Combo Box control. | An empty element is inserted at the end of the List Box control and takes the specified value. | A runtime error is displayed. Example: "Invalid index: [54]" | | The additional space characters are deleted. | A runtime error is displayed. Example: "The 'WIN1' window cannot be found" | Using the functions for managing popup and drop-down menus with a menu number that does not exist. | The function returns '0' and ErrorInfo is filled. | A runtime error is displayed. Example: "The [54645] option does not exist in the menu" | Using Right and Left with a negative number of characters to extract. | The function returns an empty string (""). | The function returns EOT and ErrorInfo is filled. | Using Middle with a start position that is negative and/or with a negative number of characters to extract. | The function:- starts the extraction from the beginning of the string if the start position is negative.
- returns the entire source string.
| The function returns EOT and ErrorInfo is filled. |
Business / UI classification: Neutral code
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|