System Variables

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 2004 (Modified)


4th Dimension manages system variables, which allow you to control the execution of different operations. All system variables are process variables that can only be accessed within one process. This section describes 4th Dimension system variables.

OK

This is the most commonly used system variable. Usually it is set to 1 when an operation is successfully executed. It is set to 0 when the operation fails. Most of the 4D commands modify the value of the OK system variable. Refer to the description of each command to find out whether it affects this system variable.

Document

Document contains either the "long name" (access path+name) or the name (depending on the value passed as parameter) of the last file opened or created using the following commands:

Append document BUILD APPLICATION
Create document Create resource file
EXPORT DATA EXPORT DIF
EXPORT SYLK EXPORT TEXT
IMPORT DATA IMPORT DIF
IMPORT SYLK IMPORT TEXT
LOAD SET LOAD VARIABLES
Open document Open resource file
PRINT LABEL QR REPORT
READ PICTURE FILE SAVE VARIABLES
SAVE SET Select document
SELECT LOG FILE SET CHANNEL
USE ASCII MAP WRITE PICTURE FILE

FldDelimit

FldDelimit contains the ASCII code that will be used as a field separator when importing or exporting text. By default, this value is set to 9, which is the ASCII code for the Tab key. To use a different field separator, assign a new value to FldDelimit.

RecDelimit

RecDelimit contains the ASCII code that will be used as a record separator when importing or exporting text. By default, this value is set to 13, which is the ASCII code for the Carriage Return key. To use a different record separator, assign a new value to RecDelimit.

Error

Error can only be used in a method installed by the ON ERR CALL command. This variable contains the error code. 4th Dimension error codes and system error codes are listed in the Error Codes section.

MouseDown, MouseX, MouseY, KeyCode, Modifiers and MouseProc

These system variables can only be used in a method installed by the ON EVENT CALL command.

MouseDown is set to 1 when the mouse button is pushed. Otherwise, it is set to 0.

If the event is a MouseDown (MouseDown=1), the MouseX and MouseY system variables are respectively set to the vertical and horizontal coordinates of the location where the click took place. Both values are expressed in pixels and use the local coordinate system of the window.

KeyCode is set to the ASCII code of the key that was just pressed. If the key is a function key, KeyCode is set to a special code. ASCII codes and function key codes are listed in the sections ASCII Codes and Function Key Codes.

Modifiers is set to the keyboard modifier keys (Ctrl/Command, Alt/Option, Shift, Caps Lock). This variable is only significant in an "interruption on event" installed by the command ON EVENT CALL.

MouseProc is set to the process number in which the last event took place.

See Also

Sets, Variables.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next