|
From: Juergen W. <wie...@fr...> - 2004-10-14 19:29:19
|
Am Mittwoch, 13. Oktober 2004 20:01 schrieb Ethan Merritt: > > I was expecting more feedback, but maybe "no news = good news". > > Yes, the core code can probably go into cvs. The add-ons > > should get more discussion. I'll start separate threads for > > each. > > The string variables "extra features" patch (#1043790) > only contains two features right now: > > 1) String variables are auto-promoted to numbers if they are > encountered during evaluation of an arithmetic expression. > e.g: (3 == "1" + "2") evaluates to TRUE > > 2) Integers are auto-promoted to strings if they are encountered > during evaluation of a string expression. > e.g.: > N = N + 1 > filename = "run_" . N . ".dat" > print filename > run_4.dat > > I am not aware of any problems introduced by either feature, > but comments are welcome. I'm not sure if this one is really needed. I would rather like to have a builtin function "atof" to explicitly cast strings to numbers. The other way round is done by sprintf. This patch makes the difference between numerical and string variables less clear. Juergen |