|
|
|
|
|
- parameter
- Limitations and remarks
Compilation instruction: IF TargetExecution In french: SI CibleExécution
The <IF ExecutionTarget> compile statement allows you to compile or not compile a WLanguage code depending on the execution target. This statement is mainly used to easily get a multi-configuration code, without displaying any compilation errors. Note: As a general rule, <COMPILE IF> compilation conditions should be used as much as possible to manage differences between different platforms.. However, when any of the configurations that use the code needs to adapt to multiple execution targets, it is necessary to use <IF ExecutionTarget>. <IF CibleExécution=ApplicationWindows OR CibleExécution=Java>
Open(FEN_Menu)
<END>
<IF CibleExécution=Android OR CibleExécution=iOS>
OpenMobileWindow(FEN_Menu)
<END>
<IF CibleExécution=Site>
PageDisplay(PAGE_Login)
<END>
Syntax
Simple execution target
<IF <ExecutionTarget=<Target name>> ... // Code if the condition is true <END>
Combination of conditions
<IF <ExecutionTarget=<Target name> OR <ExecutionTarget=<Target name2>> ... // Code if the condition is true <END>
Using the <> operator
<IF <ExecutionTarget <> <Target name>> ... // Code if the condition is true <END>
Using an ELSE block
<IF <ExecutionTarget <> <Target name>> ... // Code if the condition is true <ELSE> ... // Code if the condition is false <END>
Remarks <Target name> parameter The different targets are as follows: - Android
- AppleWatch
- DotNetApplication
- LinuxApplication
- WindowsApplication
- DotNetAssembly
- Library
- ExternalComponent
- iOS
- iOSWidget
- Java
- Linux
- MacCatalyst
- RADPattern
- ActionPlan
- WebSocketServer
- WebSocketServerLinux
- WebSocketServerWindows
- LinuxService
- WindowsService
- Site
- SiteLinux
- PHPSite
- SiteWindows
- UniversalWindowsApp
- Web service
- WebserviceLinux
- WebserviceWindows
- Windows
- You cannot declare global variables in an <IF ExecutionTarget> statement.
- Local variables must have unique names for all execution targets.
Behavior change: Starting with version 28 Update 1, when GOing Linux applications, the runtime target taken into account will be "Linux" (and not "Windows" as in previous versions)..
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|