Ignore:
Timestamp:
06/19/06 16:14:56 (18 years ago)
Author:
smasson
Message:

new compilation options (compile_opt idl2, strictarrsubs) in each routine

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/ToBeReviewed/COULEURS/getcolor.pro

    r19 r114  
    181181 
    182182FUNCTION COLOR24, number 
     183; 
     184  compile_opt idl2, strictarrsubs 
     185; 
    183186 
    184187   ; This FUNCTION accepts a [red, green, blue] triple that 
     
    204207num24bit = 0L 
    205208 
    206 FOR j=0,2 DO num24bit = num24bit + ((number(j) MOD 16) * base16(0,j)) + $ 
    207    (Fix(number(j)/16) * base16(1,j)) 
     209FOR j=0,2 DO num24bit = num24bit + ((number[j] MOD 16) * base16[0,j]) + $ 
     210   (Fix(number[j]/16) * base16[1,j]) 
    208211 
    209212RETURN, num24bit 
     
    214217FUNCTION GETCOLOR, thisColor, index, TRUE=truecolor, $ 
    215218   NAMES=colornames, LOAD=load, START=start 
     219; 
     220  compile_opt idl2, strictarrsubs 
     221; 
    216222 
    217223   ; Set up the color vectors. 
     
    315321 
    316322varInfo = SIZE(thisColor) 
    317 IF varInfo(varInfo(0) + 1) NE 7 THEN $ 
     323IF varInfo[varInfo[0] + 1] NE 7 THEN $ 
    318324   MESSAGE, 'The color name must be a string.' 
    319325thisColor = STRUPCASE(thisColor) 
     
    326332   ; set the index to a YELLOW color, and continue. 
    327333 
    328 IF colorIndex(0) LT 0 THEN BEGIN 
     334IF colorIndex[0] LT 0 THEN BEGIN 
    329335   MESSAGE, "Can't find color. Returning YELLOW.", /INFORMATIONAL 
    330336   colorIndex = 3 
     
    333339   ; Get the color triple. 
    334340 
    335 r = rvalue(colorIndex) 
    336 g = gvalue(colorIndex) 
    337 b = bvalue(colorIndex) 
     341r = rvalue[colorIndex] 
     342g = gvalue[colorIndex] 
     343b = bvalue[colorIndex] 
    338344returnColor = REFORM([r, g, b], 1, 3) 
    339345 
Note: See TracChangeset for help on using the changeset viewer.