|
From: Juergen W. <wie...@fr...> - 2005-07-04 17:36:55
|
Hans-Bernhard Broeker wrote: > Juergen Wieferink wrote: > > I don't understand this, and I feel really should. Is there really > > a problem with "if (value.type == INTGR)", or would it be the "else" > > part that makes problems? > > If there's an else part, that'll almost certainly create problems. An > "if (value.type != INTGR)" quite likely will. As will any "switch()" > that doesn't have a case(STRING) or a default case that does a sensible > thing. > > All such cases are likely to break if we enable the STRING entry in > DATA_TYPES, but don't also turn on the rest of the string-variables stuff. But the problem only occurs where the val.type is actually set to STRING. This wouldn't be allowed anywhere but within this special context of eval_plot() & Co. And uninitialized "struct value"s mustn't be used anyway because of the current string variable implementation. But I agree that my proposal is a Bad Thing. Juergen |