--- ray/src/common/caldefn.c 2012/07/29 22:10:45 2.25 +++ ray/src/common/caldefn.c 2020/04/02 18:00:34 2.28 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: caldefn.c,v 2.25 2012/07/29 22:10:45 greg Exp $"; +static const char RCSid[] = "$Id: caldefn.c,v 2.28 2020/04/02 18:00:34 greg Exp $"; #endif /* * Store variable definitions. @@ -27,8 +27,6 @@ static const char RCSid[] = "$Id: caldefn.c,v 2.25 201 #include "copyright.h" -#include -#include #include #include "rterror.h" @@ -142,6 +140,13 @@ varset( /* set a variable's value */ return; } } + if (ep1 != NULL && esupport&E_REDEFW) { + wputs(qname); + if (ep1->type == ':') + wputs(": reset constant expression\n"); + else + wputs(": reset expression\n"); + } /* hand build definition */ ep1 = newnode(); ep1->type = assign; @@ -697,7 +702,7 @@ getchan(void) /* A -> $N = E1 */ static double /* evaluate a variable */ -dvalue(char *name, EPNODE *d) +dvalue(char *name, EPNODE *d) { EPNODE *ep1, *ep2; @@ -709,6 +714,10 @@ dvalue(char *name, EPNODE *d) ep1 = d->v.kid->sibling; /* get expression */ if (ep1->type == NUM) return(ep1->v.num); /* return if number */ + if (esupport&E_RCONST && d->type == ':') { + wputs(name); + wputs(": assigned non-constant value\n"); + } ep2 = ep1->sibling; /* check time */ if (eclock >= MAXCLOCK) eclock = 1; /* wrap clock counter */