4D v13.4Compiler Commands |
|||||||||||||||
|
4D v13.4
Compiler Commands
Compiler Commands
The integrated compiler of 4D translates your database applications into assembly level instructions. The advantages of the compiler are:
For a description of the operation of the 4D compiler, refer to the Design Reference manual. The commands in this theme relate to the use of the compiler. They enable you to normalize data types throughout your database. The IDLE command is specifically used in compiled databases.
These commands, except IDLE, declare variables and cast them as a specified data type. Declaring variables resolves ambiguities concerning a variable’s data type. If a variable is not declared with one of these commands, the compiler attempts to determine a variable’s data type. The data type of a variable used in a form is often difficult for the compiler to determine. Therefore, it is especially important that you use these commands to declare a variable used in a form. Note: To save time, you can use the option for generating and updating typing methods (called “Compiler methods”) found in the compiler window. This option automatically creates typing methods that take stock of and assign a type to all of the variables used in the database. Arrays are variables that must follow the same rules as standard variables with respect to compilation. The array declaration commands are grouped together in the “Arrays” theme.
These principles are detailed in the following sections:
The following are some basic variable declarations for the compiler: C_BLOB(vxMyBlob) ` The process variable vxMyBlob is declared as a variable of type BLOB In the following example, the project method OneMethodAmongOthers declares 3 parameters: ` OneMethodAmongOthers Project Method In the following example, the project method Capitalize accepts a string parameter and returns a string result: In the following example, the project method SEND PACKETS accepts a time parameter followed by a variable number of text parameters: ` SEND PACKETS Project Method In the following example, the project method COMPILER_Param_Predeclare28 predeclares the syntax of other project methods for the compiler: ` COMPILER_Param_Predeclare28 Project Method |
PROPERTIES
Product: 4D SEE ALSO
C_BLOB |
|||||||||||||