The
diagnostics function is used to get information about the version of CSPro you are using, as well as other functionality. It is used mostly for troubleshooting.
The function takes a string expression property and then optional string arguments that determine what it returns. If called without a property, the function will return all of the no-argument diagnostic properties. The properties are:
Property | Argument | Diagnostic Value |
version | | The currently running CSPro version (8.0). |
version_detailed | | The currently running CSPro version (8.0.1). |
releasedate | | The date that this version of CSPro was released (in YYYYMMDD format). |
beta | | Whether the current CSPro version is a beta version (1 if true, 0 if false). |
serializer | | The version of a .pen file that would be created with the current version of CSPro. |
md5 | File name | The MD5 hash value of the file. This can also be created by using the action Hash.createMd5. |
The function returns a string containing the diagnostic information. If the property is invalid, then the function returns a blank string.
PROC MATERNITY_QUEST
preproc
if diagnostics("version") <> "8.0" then
errmsg("This application has not been tested with this version of CSPro. "
"Things may behave differently than expected.");
endif;