Add an error message for a .model line that includes a default value
for a read-only instance parameter. Before that caused a fatal error in parsing the first device to use the model.
This commit is contained in:
parent
8ab446fc9c
commit
35ae1ece8c
|
|
@ -149,12 +149,18 @@ create_model(CKTcircuit *ckt, INPmodel *modtmp, INPtables *tab)
|
|||
|
||||
if (p) {
|
||||
char *value;
|
||||
INPgetTok(&line, &value, 1);
|
||||
|
||||
modtmp->INPmodfast->defaults =
|
||||
wl_cons(copy(parm),
|
||||
wl_cons(value,
|
||||
modtmp->INPmodfast->defaults));
|
||||
INPgetTok(&line, &value, 1);
|
||||
if (p->dataType & IF_SET) {
|
||||
modtmp->INPmodfast->defaults =
|
||||
wl_cons(copy(parm),
|
||||
wl_cons(value, modtmp->INPmodfast->defaults));
|
||||
} else {
|
||||
fprintf(stderr,
|
||||
"Ignoring attempt to set a default "
|
||||
"for read-only instance parameter %s in:\n %s\n",
|
||||
p->keyword, modtmp->INPmodLine->line);
|
||||
}
|
||||
} else {
|
||||
|
||||
double dval;
|
||||
|
|
|
|||
Loading…
Reference in New Issue