There are 6 basic data types. These are:
Parameters to functions belong to these basic types. Functions return these types. The data type of a prompt or of a data reference is determined by the context of use. For example, if you use a prompt for a date-type parameter the prompt will be interpreted as a date.
Sometimes, however, a context can be ambiguous. In the following function, for example, the prompts could be dates, numbers or strings:
=IsTrue(["Field 1"] = ["Field 2"])
By using the Number function as a type specifier, however, all ambiguity can be removed. e.g.
=IsTrue(Number(["Field 1"]) = Number(["Field 2"]))
There are 7 functions that can be used as type specifiers, in this way - one for each of the basic data types, plus one for 'Individual':
|Bool||Takes a boolean (True or False) parameter and returns that boolean value|
|Date||Takes a date parameter and returns that date.|
|Individual||Takes a reference to an Individual as parameter and returns a reference to that Individual|
|Item||Takes a data item parameter and returns that data item|
|Number||Takes an integer (no decimal point) number as a parameter and returns that number.|
|Float||Takes a floating-point number as a parameter and returns that number.|
|Text||Takes a text expression as a parameter and returns that text expression.|
These are very simple functions. Each of them takes one parameter only and returns that parameter. Their primary purpose is for use as type-specifiers, but you do not have to use them for that purpose. They are in fact functions like any other, and can be used as such if you wish. The Text function, for example, is sometimes a convenient function to use for concatenating text expressions. The Individual function can also be useful if you have a function that can take a record, say, but you want to use it with a prompt that will only range over Individuals.