1 #include <../../nmodlconf.h>
29 diag(
"Multiple declaration of ", sym->
name);
31 if (declare_level < sym->level) {
43 diag(
"Multiple inconsistent declarations of ", sym->
name);
55 diag(
"promotion not programmed yet", (
char*) 0);
65 diag(
"Only one independent variable can be defined", (
char*) 0);
76 diag(
"Only one SWEEP declaration is allowed", (
char*) 0);
89 diag(s->
name,
"used before DEFINE'ed");
93 s->
u.
i =
SYM(q2)->u.i;
95 s->
u.
i = atoi(
STR(q2));
116 }
else if (
q->itemtype ==
STRING) {
123 diag(s->
name,
"Array index must be > 0");
131 diag(
"internal error inlisttype: First element of LIST is a LIST", (
char*) 0);
133 switch (
q->itemtype) {
145 diag(
"internal error in listtype: SYMBOL not first element", (
char*) 0);
172 diag(
"No INDEPENDENT variable has been declared", (
char*) 0);
177 if (s->type == PRIME) {
179 diag(s->name,
"is used but its corresponding STATE is not declared");
182 if (
nprime(s->name) == 1) {
204 if (s->
type == PRIME) {
207 }
else if (s->
name[strlen(s->
name) - 1] ==
'0') {
208 buf[strlen(
buf) - 1] =
'\0';
217 #if __TURBOC__ || SYSV || VMS || !defined(HAVE_INDEX) || defined(HAVE_STRINGS_H)
226 return strlen(s) - (cp - s);
void declare(long subtype, Item *q, Item *qa)
void declare_array(Symbol *s)
static int nprime(char *)
static int promote(Symbol *, long)
Symbol * basestate(Symbol *s)
void decdim(Symbol *s, Item *q)
void install_cfactor(Item *qname, Item *q1, Item *q2)
void define_value(Item *q1, Item *q2)
void declare_indep(Symbol *sym)
char * decode_units(Symbol *)
Item * putintoken(char *s, short type, short toktype)
Item * itemarray(va_alist) va_dcl
char * stralloc(char *buf, char *rel)
static double save(void *v)