If you use a constant value in an expression and the constant contains one of the separator characters (+, -, *, /, &, **, (, ), comma, or space), enclose the constant in quotation marks.

For example, if you use a date constant such as 01/15/93 in an expression, enclose the date in quotation marks: '01/15/93'.

Note: Be sure to use the quote characters set in the Quotes setting, which you can verify by choosing Utilities: Settings.

Expressions can contain up to 160 characters. Each R:BASE command can contain up to 40 expressions wherever expressions are legal. For example, you can define up to 40 computed columns in a table. An expression can contain a maximum of 50 items (an item can be an operator or an operand).

Expressions can contain one or more R:BASE math functions, each of which counts as an item.

You can use the value of a global variable in an expression by placing a period before the variable name, as in .variable.

As a standard practice, you should place single quotation marks around text strings to ensure that R:BASE interprets them correctly.

Follow these general rules when defining expressions:

·Set the data type of a variable before assigning it a value, for example:  
 
SET VARIABLE V1 CURRENCY, V2 INTEGER  
 
·Enclose text strings in quotation marks.  
·Begin each variable name with the letter v to distinguish variables from column names and constants, for example, v1 or vcounter.  
·Do not give a variable the same name as a column.  
·If the syntax calls for a value, use a dot variable, for example, .v1 or .vnum.  

Expression Topics
Expression Operators  
Expression Data Types  
Displaying the Calculated Values of Expressions  
Examples of Expressions