Constants and variables
Expressions may contain following constant and variable types:
integer numbers;
floating point numbers;
scientific numbers;
Decimal separator for all floating point and scientific-format numbers in expressions, is independent of the Regional Settings of Windows and always is a decimal point ('.').
boolean values - TRUE or FALSE;
date type values - values of that type must be put in quotes ( ' ' ), and also date separator character is independent of the Regional Settings of Windows and always is a slash - /, i.e. - '01/01/1999'
string values - values of that type must be put in double quotes (" "); If a string contains double quotes, you should double them(i.e., "this is a ""string"" ");
variant values;
variant arrays - elements of the array can be referenced, as usual: vararray_variable_name[index], i.e. V1;
DB fields - the format of using is [DataSourceName].DataFieldName. Data source can be any datasource component, on the same form of the Expression parser component or on the data module. If it is on a data module use the datamodule name to qualify the name.(i.e. [DM1.Table1]). The datasource name must be enclosed in square brackets.
any runtime component - the format of using is [ComponentName]. A component can be any component on the same form of the Expression parser component or on the data module. If it is on a data module use the datamodule name to qualify the name.(i.e. [DM1.Table1]). The component name must be enclosed in square brackets. Since the parser type is Variant type, if you want to pass a runtime component as a parameter to your custom registered function, to get the pointer of the specified component in a body of your function you must use type modifiers, i.e TComponent(Integer(Param1)).
Note that within a formula, the value of an entry of an actual record can be reached through the name of the entry.
Result:=Entryname+3;
If you want to set a constant value for the entry, then instead of
Entryname:=3;
you have to use the SetValue function from the list of functions in the formula editor:
SetValue(Entryname, 3);.