From: <and...@us...> - 2008-08-31 10:27:49
|
Revision: 8730 http://plplot.svn.sourceforge.net/plplot/?rev=8730&view=rev Author: andrewross Date: 2008-08-31 10:27:59 +0000 (Sun, 31 Aug 2008) Log Message: ----------- Tcl example 21 - change use of ** operator to pow function for portability. ** was only introduced in tcl8.5. Note the example still requires tcl8.5 for NaN support, but at least it compiles now and fails gracefully at run time with the version check at the beginning of the code. Modified Paths: -------------- trunk/examples/tcl/x21.tcl Modified: trunk/examples/tcl/x21.tcl =================================================================== --- trunk/examples/tcl/x21.tcl 2008-08-31 10:21:45 UTC (rev 8729) +++ trunk/examples/tcl/x21.tcl 2008-08-31 10:27:59 UTC (rev 8730) @@ -100,7 +100,7 @@ } else { set xx [x $i] set yy [y $i] - z $i = [expr {log((1.-$xx)**2 + 100.*($yy-$xx**2)**2)}] + z $i = [expr {log(pow(1.-$xx,2)) + 100.*pow($yy-pow($xx,2),2)}] } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |