#ISDEFINED

#ISDEFINED( definition )

definitionThe name of an ECL definition.
ReturnsA BOOLEAN value

#ISDEFINED returns whether or not the definition has been defined at the point it appears in the code.

Example:

getFlagsValue(defname) := MACRO
  defname :=
  #IF (#ISDEFINED(DoAlways))
     1 +
  #ELSEIF (#ISDEFINED(DoNever))
     2 +
  #END
     3;
ENDMACRO;

#ISDEFINED(DoNever); //false

getFlagsValue(x1);  //neither is defined yet = 3
OUTPUT(x1); //3

DoNever := 'fred';
getFlagsValue(x2);  //only DoNever is defined = 5
OUTPUT(x2); //5

DoAlways := 42;
getFlagsValue(x3);  //both are defined = 4 (so the #ELSEIF isn't evaluated)
OUTPUT(x3); //4

#ISDEFINED(DoNever); //true

See Also: #IFDEFINED