From: Geoffrey F. <fu...@ga...> - 2002-02-19 22:00:16
|
Alan W. Irwin writes: > I have been struggling with resetting the cmap1 to default values for tcl. > Turns out my problems were due to the following construct which I thought > should work to initialize the matrix. > > matrix l f 6 = {0.5, $midpt, $vertex, $vertex, $midpt, 0.5} > > This silently fails by sticking zeroes everywhere there is a variable > reference (i.e., all the interior points) even though the variables have > previously been set. Isn't this a bug? Shouldn't the variables just be > replaced by their values? > > I worked around this by using > > l 1 = $midpt > l 2 = $vertex > > etc., in x08.tcl, > > but I don't think this workaround should be necessary. :-). It's called "Tcl" because you're supposed to giggle every time it annoys you. Braces protect against variable interpolation. There's probably a way to get what you want using eval or list or something. -- Geoffrey Furnish fu...@ga... |