In article <4ug4md$74e@vixen.cso.uiuc.edu>, kspencer@s.psych.uiuc.edu says... > >I've been looking at "min_curve_surf" in the IDL /lib directory. On lines >264-265, there is the following: > >; For min_curve_surf, divide c(3:*) by 2 cause we use d^2 rather than d. >if keyword_set(tps) eq 0 then c(3) = c(3:*)/2.0 > ^^^^ > >It seems to me that "c(3)" should be "c(3:*)", according to the comment. >Has anybody noticed this? > >Kevin >----------------------------------------------------------- >Kevin Spencer >Cognitive Psychophysiology Laboratory and Beckman Institute >University of Illinois at Urbana-Champaign >kspencer@s.psych.uiuc.edu >----------------------------------------------------------- Kevin, I hadn't noticed it, but there is no problem. IDL has the convention that, when storing an array or subarray in another array, the location on the left hand side of the expression need only be referenced by the first location, rather than the whole set of locations. E.g., IDL> x=INTARR(100,100) IDL> x(50:*,50:*)=INDGEN(50,50) --OR-- IDL> x(50,50)=INDGEN(50,50) The last two statements are equivalent. This is the sense of the line in min_curve_surf that was troubling you. Since array 'c' is already defined, the elements (3:*) can be halved by dividing by 2 and storing into 'c' beginning at element 3. Hope this helps. Further information can be found on page 6-5 of the IDL User's Guide. Dave -- ------------------------------------------------------------------------ David P. Steele Ph: (306) 966-6447 ISAS, University of Saskatchewan Fax: (306) 966-6400 116 Science Place David.Steele@usask.ca Saskatoon SK S7N 5E2 CANSAS::STEELE