|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.|
Default Values for Simple Types (Crystal Syntax)
An uninitialized variable will have the default value for its type. In general, it is not a good programming practice to rely on the default values of types. For example, initialize all local variables in your formula, initialize all global variables in a formula placed in the Report Header and initialize all shared variables in a formula placed in the Report Header of the main report.
When an array is resized using the Redim keyword, the entries are filled with default values for the type.
"" //The empty string
Date (0, 0, 0) //The null Date value
The null Time value. Value held by an uninitialized Time variable.
The null DateTime value. Value held by an uninitialized DateTime variable.
Note It is not recommended that your formulas rely on the values of uninitialized range or array variables.