|
|
|
|
|
- Sharing code between WINDEV, WINDEV Mobile and WEBDEV
- Running processes containing compilation errors
- Function availability
InWindowsMobileMode (Function) In french: EnModeWindowsMobile
Warning
From version 27, this feature is no longer available.
Indicates whether the code is run: - from a Windows Mobile application.
- from a WINDEV application, from a WEBDEV site or from a PHP application.
// Code run from the Windows Mobile application? IF InWindowsMobileMode() = True THEN // Windows Mobile application // Process to perform ... ELSE // WINDEV application, PHP application or WEBDEV site // Process to perform ... END
Syntax
<Result> = InWindowsMobileMode()
<Result>: Boolean - True if the code is run from an application for Windows Mobile,
- False if the code is run from a WINDEV application, from a PHP application or from a WEBDEV site, ...
Remarks Sharing code between WINDEV, WINDEV Mobile and WEBDEV InWindowsMobileMode allows you to share source code between WINDEV, WINDEV Mobile and WEBDEV. During the compilation, the functions that cannot be used in WINDEV Mobile will be signaled in the "Code" pane. However, no runtime error will be triggered by these functions. For example, the following code is shared between a WINDEV Mobile application and a WINDEV application. MyParameterFile is string // Code run from the WINDEV Mobile application? IF InWindowsMobileMode() = True THEN // WINDEV Mobile application MyParameterFile = "\MyFiles\Param.INI" ELSE // WINDEV application MyParameterFile = fCurrentDir() + "\Param.INI" END
During the compilation, an error will be displayed in the "Code" pane to indicate that fCurrentDir is not allowed in Windows Mobile. However, no runtime error will occur when the application is used on a mobile device: indeed, fCurrentDir will never be called. Running processes containing compilation errors By default, the security mechanism of WLanguage is triggered only if the line containing the compilation error is run. For example, if a function not allowed in the current product is found in a loop (IF), the security mechanism of WLanguage will be triggered only if the line containing this function is run. Function availability InWindowsMobileMode can be used in all IDEs to allow for cross-platform code. Functions or procedures that use InWindowsMobileMode can be shared between several products without generating any compilation error. Business / UI classification: Neutral code
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|