[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
C2015 Illegal initializer
Explanation: You declared a STATIC variable with an initializer
that is not a literal value. Because a static initializer is computed
at compile time and assigned before the beginning of execution, it must
consist entirely of constants and simple operators (no variables or
function calls). Initializers for variables of other storage classes
(e.g., LOCAL, PRIVATE, and PUBLIC) can be any valid CA-Clipper
expression.
Action: Some suggestions to resolve the problem are:
1. Change the static initializer to a constant or literal value and
recompile.
2. If you want to initialize a static variable with an expression, you
must do it within the body of a function or procedure. The following
method shows how it can be done:
STATIC cVar
.
.
.
IF cVar == NIL
cVar := <xExp>
ENDIF
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson