1 #include <../../nrnconf.h>
23 diag(
"Multiple declaration of ", sym->
name);
34 diag(
"promotion not programmed yet", (
char*) 0);
44 diag(
"Only one independent variable can be defined", (
char*) 0);
55 diag(
"Only one SWEEP declaration is allowed", (
char*) 0);
65 diag(
s->name,
"already declared");
68 diag(
s->name,
"used before DEFINE'ed");
72 s->u.i =
SYM(q2)->u.i;
74 s->u.i = atoi(
STR(q2));
94 s->araydim =
SYM(
q)->u.i;
95 }
else if (
q->itemtype ==
STRING) {
96 s->araydim = atoi(
STR(
q));
101 if (
s->araydim < 1) {
102 diag(
s->name,
"Array index must be > 0");
110 diag(
"internal error inlisttype: First element of LIST is a LIST", (
char*) 0);
112 switch (
q->itemtype) {
124 diag(
"internal error in listtype: SYMBOL not first element", (
char*) 0);
151 diag(
"No INDEPENDENT variable has been declared", (
char*) 0);
156 if (
s->type == PRIME) {
158 diag(
s->name,
"is used but its corresponding STATE is not declared");
182 strcpy(
buf,
s->name);
183 if (
s->type == PRIME) {
186 }
else if (
s->name[strlen(
s->name) - 1] ==
'0') {
187 buf[strlen(
buf) - 1] =
'\0';
199 cp = strchr(
s,
'\'');
200 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)
const char * decode_units(Symbol *)
Symbol * lookup(const char *)
char * stralloc(const char *buf, char *rel)
Item * putintoken(const char *s, short type, short toktype)
Item * itemarray(int narg,...)
void Unit_push(const char *)
List * newlist()
The following routines support the concept of a list.
int Sprintf(char(&buf)[N], const char *fmt, Args &&... args)
Redirect sprintf to snprintf if the buffer size can be deduced.
static double save(void *v)