4D v13.4

Version type

Home

 
4D v13.4
Version type

Version type 


 

Version type -> Function result 
Parameter Type   Description
Function result  Longint in Demo or full version, 64-bit or 32-bit version

The Version type command returns a numeric value that denotes the type of 4D or 4D Server version that you are running. 4D provides the following predefined constants, found in the 4D Environment theme:

Constant Type Value
64 bit Version Longint 1
Demo Version Longint 0

Note: In current versions of 4D (v12 and v13), the demo mode is not available.

Version type returns a value in the form of a bit field; it is necessary to use bitwise operators to interpret it (see the example).

COMPATIBILITY NOTE: In versions of 4D prior to 13.2, a different set of constants was available for this command; however, these constants did not handle some cases properly, so they were modified. This modification means that your code must be adapted (see example). However, if you wish to keep the previous functioning, you can just replace the constants in your existing code with their former values: 2 for 64 bit Version, 1 for Demo Version, 0 for Full Version.

Example  

Your 4D application contains specific code based on the version running. You can find out the execution environment using the following code:

 If(Version type?? 64 bit Version)
  // We are in a 64-bit version
 Else
  // We are in a 32-bit version
 End if

 
PROPERTIES 

Product: 4D
Theme: 4D Environment
Number: 495

 
INDEX

Alphabetical list of commands

 
HISTORY 

New
Created: 4D v6
Modified: 4D v12
Modified: 4D v13.2

 
SEE ALSO 

Application type
Application version

 
TAGS 

64 bits***