PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • Disabling the JITc technology
  • Optimizing the external calls
  • Managing errors
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Used 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 technology is used by the application. The JITc technology is used by default by the application. It can only be disabled.
  • Versions 15 and later
    find out and/or modify the management mode of low references for all the instantiated objects.
    New in version 15
    find out and/or modify the management mode of low references for all the instantiated objects.
    find out and/or modify the management mode of low references for all the instantiated objects.
Versions 18 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 18
Universal Windows 10 App This function is now available in Windows Store apps mode.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Universal Windows 10 App This function is now available in Windows Store apps mode.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 21 and later
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
// 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

Retrieving the current runtime mode Hide the details

<Result> = ExecutionMode()
<Result>: Combination of Integer constants
Current runtime mode of application or site:
ExternalCallsOptimizedOptimizes the management of external calls to procedures. This parameter is associated with one of the two following constants.
WEBDEV - Server code This constant is not available.
DisableOptimizedExecutionThe JITc technology (Just In Time compilation) is disabled.
Versions 15 and later
ForceDestructorNonDynamicObject
New in version 15
ForceDestructorNonDynamicObject
ForceDestructorNonDynamicObject
Forces the destruction of non-dynamic objects (even if a strong reference was taken).
modeFormerOperatingModeDurationThe Duration properties keep the operating mode used in version 12.
NormalModeThe errors that occurred generate error messages.
PermissiveModeThe 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.
ExternalCallsOptimizedOptimizes the management of external calls to procedures. This parameter is associated with one of the two following constants.
WEBDEV - Server code This constant is not available.
DisableOptimizedExecutionThe JITc technology (Just In Time compilation) is disabled.
Versions 15 and later
ForceDestructorNonDynamicObject
New in version 15
ForceDestructorNonDynamicObject
ForceDestructorNonDynamicObject
Forces the destruction of non-dynamic objects (even if a strong reference was taken).
modeFormerOperatingModeDurationThe Duration properties keep the operating mode used in version 12.
NormalModeThe errors that occurred generate error messages.
PermissiveModeThe errors that occurred are ignored (WINDEV 5.5 or WEBDEV 1.5 mode).
<New Runtime Mode>: Integer constant
New runtime mode to apply.
ExternalCallsOptimizedOptimizes the management of external calls to procedures. This parameter is associated with one of the two following constants.
WEBDEV - Server code This constant is not available.
DisableOptimizedExecutionDisables the JITc technology (Just In Time compilation).
Versions 15 and later
ForceDestructorNonDynamicObject
New in version 15
ForceDestructorNonDynamicObject
ForceDestructorNonDynamicObject
Forces the take of low reference for all the objects.
modeFormerOperatingModeDurationThe Duration properties keep the operating mode used in version 12.
NormalModeThe errors that occurred generate error messages.
PermissiveModeThe errors that occurred are ignored (WINDEV 5.5 or WEBDEV 1.5 mode)
Remarks
WINDEVReports and QueriesUser code (UMC)

Disabling the JITc technology

To disable the JIT technology in an application, we recommend that you use ExecutionMode associated with the DisableOptimizedExecution constant in the initialization code of project. In this case, only the elements loaded before running the initialization code of the project (components, sets of procedures, classes) will use the JITc technology.
To disable the JITc technology for a WINDEV application (problem caused by the JITc technology for instance), we recommend that you modify (or create) the <Executable Name>.WX file. This file must be found beside the executable of the application and it must contain the following information:
[WD_EXECUTION]
OPTIM_EXECUTION=0

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 code line allows you to take into account the optimization of external calls:
ExecutionMode(PermissiveMode + ExternalCallsOptimized)

Managing errors

The table below presents the behavior of the application according ot the errors that occurred:
Error casePermissiveModeNormalMode
Reading a subscript 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:
"The specified subscript [-1] is invalid"
Writing into a negative subscript of a List Box, Table or Combo Box control.
Example:
List[-1] = "Smith"
The code line is ignoredA runtime error is displayed.
Example:
"The specified subscript[-1] is invalid"
Writing into a too large subscript 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:
"The specified subscript [54] is invalid"
Using Open, OpenChild, OpenSister with a window name containing additional space characters.
Using Open, OpenMobileWindow, OpenChild, OpenSister with a window name containing additional space characters.
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 specified menu option [54645] 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.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230vm.dll
Windows Mobile wp230vm.dll
Linux wd230vm.so
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment