|
1 |
| -C RCS $Id: gnuplot.doc,v 1.1111 2017-10-03 23:42:41 sfeam Exp $ |
| 1 | +C RCS $Id: gnuplot.doc,v 1.1112 2017-10-08 19:10:41 sfeam Exp $ |
2 | 2 | C
|
3 | 3 | C Copyright (C) 1986 - 1993, 1998, 1999, 2000, 2001, 2004 Thomas Williams, Colin Kelley et al.
|
4 | 4 | C
|
@@ -2559,14 +2559,21 @@ Ffigure_newsyntax
|
2559 | 2559 |
|
2560 | 2560 | ?scope
|
2561 | 2561 | =scope
|
2562 |
| - The scope of an iteration variable is private to that iteration. |
| 2562 | + With one exception, gnuplot variables are global. |
| 2563 | + There is a single, persistent, list of active variables indexed by name. |
| 2564 | + Assignment to a variable creates or replaces an entry in that list. |
| 2565 | + The only way to remove a variable from that list is the `undefine` command. |
| 2566 | + |
| 2567 | + The single exception to this is the variable used in an iteration specifier. |
| 2568 | + The scope of the iteration variable is private to that iteration. |
2563 | 2569 | You cannot permanently change the value of the iteration variable inside the
|
2564 | 2570 | iterated clause. If the iteration variable has a value prior to iteration,
|
2565 | 2571 | that value will be retained or restored at the end of the iteration.
|
2566 |
| - E.g. the following clause will iterate 10 times, after which i is again "A". |
| 2572 | + For example, the following commands will print 1 2 3 4 5 6 7 8 9 10 A. |
2567 | 2573 |
|
2568 | 2574 | i = "A"
|
2569 |
| - do for [i=1:10] { i=10 } |
| 2575 | + do for [i=1:10] { print i; i=10; } |
| 2576 | + print i |
2570 | 2577 |
|
2571 | 2578 | 2 linetypes, colors, and styles
|
2572 | 2579 | ?linetypes
|
|
0 commit comments