- Disabling JITc
- Optimizing the external calls
- Managing errors
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, ExecutionMode can be used to restore the behavior of WINDEV 5.5.
- 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.
// Test mode? IF InTestMode() = True THEN ExecutionMode(NormalMode) ELSE // Apply the operating mode of WINDEV 5.5 // to avoid displaying some errors ExecutionMode(PermissiveMode) END
Syntax <Result>: Combination of Integer constants Current runtime mode of application or site: | | 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. | | 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. | | 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 Caution: When a project is migrated from version 5.5, the permissive mode is automatically added into the initialization code of the project during the migration. The following line of code allows you to take into account the optimization of external calls:
ExecutionMode(PermissiveMode + ExternalCallsOptimized)
The table below presents the behavior of the application according ot 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. Example:
List[-1] = "Smith" | 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. Example:
LIST[54] = "Smith" | 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]" | Example:
Open("WIN1 ") | 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. Example:
MenuMark(WIN1, 54645) | 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. Example:
Left("abcdef", -1) | 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. Example:
Middle("abcdef", -2, -4) | 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. |
This page is also available for…
|
|
|
|