[Thread Prev][Thread Next][Index]
accessing repeat loop index
How does one access the CORRECT value of a REPEAT "index", say, for
example, to display it as a string?
Example: I have 3d data defined over (lon,lat) and a Z axis from 2
to 4 at intervals of 0.5. A repeat command such as
REPEAT /Z=2:4:0.5 (FILL R)
where "R" is the variable name, works just fine, and displays 5
successive plots of R, at Z=2,2.5,3,3.5,4.
However, trying to access the actual value of Z within the REPEAT
loop appears impossible. For example,
REPEAT /Z=2:4:0.5 (LIST Z)
produces:
REPEAT: Z=2
Z
axis ABSTRACT
Z:2
2.000
REPEAT: Z=2.5
Z
axis ABSTRACT
Z:2
2.000
REPEAT: Z=3
Z
axis ABSTRACT
Z:3
3.000
REPEAT: Z=3.5
Z
axis ABSTRACT
Z:3
3.000
REPEAT: Z=4
Z
axis ABSTRACT
Z:4
4.000
There appears to be some sort of rounding going on.
Can anyone tell me how to access the correct value of the "index"?
Thanks.
*********************************************************
* PLEASE MAKE NOTE OF OUR RECENT AREA CODE CHANGE *
* WE ARE NOW AREA CODE 253 *
*********************************************************
STEVEN HODGE, Geophysicist, Ice & Climate Project
Alaska District Office, Water Resources Division
U.S. GEOLOGICAL SURVEY
University of Puget Sound, Tacoma, WA 98416
Shipping/overnight: 1206 N. Lawrence St, Tacoma, WA 98406
Voice: 253-593-6516 Fax: 253-383-7967
---------------------------------------------------------
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement