4D v16.3Compiler Commands |
||||||||||||||
|
4D v16.3
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.
Compatibility note: The obsolete _o_C_GRAPH, _o_C_INTEGER and _o_C_STRING commands must no longer be used. 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 OneMethodAmongOthers project method declares 3 parameters: // OneMethodAmongOthers Project Method In the following example, the Capitalize project method accepts a text parameter and returns a text result: // Capitalize Project Method 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 COMPILER_Param_Predeclare28 project method predeclares the syntax of other project methods for the compiler: // COMPILER_Param_Predeclare28 Project Method
See also
_o_C_GRAPH
|
PROPERTIES
Product: 4D
HISTORY
Modified: 4D v15 R5 ARTICLE USAGE
4D Language Reference ( 4D v16) |
||||||||||||