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/UTILITAIRE/text_box.pro

    r97 r114  
    1717; keywords 
    1818;  pos          4 element vector specifying the box position and size 
    19 ;               pos(0),pos(1) specify the lower left corner coordinate 
    20 ;               pos(2),pos(3) specify the upper right corner coordinate 
     19;               pos[0],pos[1] specify the lower left corner coordinate 
     20;               pos[2],pos[3] specify the upper right corner coordinate 
    2121;               data window normalized coordinates are use 
    2222; 
     
    4343               center=center,right=right,box=box,vert_space=vert_space, _EXTRA = ex 
    4444; 
     45; 
     46  compile_opt idl2, strictarrsubs 
     47; 
    4548        ON_ERROR, 2 
    4649; 
     
    6366  xx2=xx1+nx 
    6467  yy2=yy1+ny 
    65   pos=[(xx1-nnx(0))/(nnx(1)-nnx(0)),(yy1-nny(0))/(nny(1)-nny(0)),$ 
    66        (xx2-nnx(0))/(nnx(1)-nnx(0)),(yy2-nny(0))/(nny(1)-nny(0))] 
     68  pos=[(xx1-nnx[0])/(nnx[1]-nnx[0]),(yy1-nny[0])/(nny[1]-nny[0]),$ 
     69       (xx2-nnx[0])/(nnx[1]-nnx[0]),(yy2-nny[0])/(nny[1]-nny[0])] 
    6770  posstring=string(form='(a,4(f5.2,a))',$ 
    68            ',pos=[',pos(0),',',pos(1),',',pos(2),',',pos(3),']') 
     71           ',pos=[',pos[0],',',pos[1],',',pos[2],',',pos[3],']') 
    6972  print,strcompress(posstring,/remove_all) 
    7073 
     
    7275endif else begin 
    7376   
    74   xx1 = nnx(0)+pos(0)*(nnx(1)-nnx(0)) 
    75   xx2 = nnx(0)+pos(2)*(nnx(1)-nnx(0)) 
    76   yy1 = nny(0)+pos(1)*(nny(1)-nnx(0)) 
    77   yy2 = nny(0)+pos(3)*(nny(1)-nnx(0)) 
     77  xx1 = nnx[0]+pos[0]*(nnx[1]-nnx[0]) 
     78  xx2 = nnx[0]+pos[2]*(nnx[1]-nnx[0]) 
     79  yy1 = nny[0]+pos[1]*(nny[1]-nnx[0]) 
     80  yy2 = nny[0]+pos[3]*(nny[1]-nnx[0]) 
    7881 
    7982endelse 
     
    107110;   print,f='(8a8)','charsz','i','ilines','n_lines','lpnt','wlen','sum','xwdth' 
    108111    for i=0,nwords-1 do begin 
    109       sum=sum+wlen(i)+blen 
     112      sum=sum+wlen[i]+blen 
    110113      if sum+3*blen gt xx2-xx1 then begin 
    111114        ilines=ilines+1 
    112         sum=wlen(i)+blen 
     115        sum=wlen[i]+blen 
    113116      endif 
    114       lpnt(i)=ilines         
     117      lpnt[i]=ilines         
    115118       
    116 ;      print,f='(f8.2,4i8,3f8.2)',charsize,i,ilines,n_lines,lpnt(i),$ 
    117 ;                 wlen(i)+blen,sum+3*blen,xx2-xx1 
     119;      print,f='(f8.2,4i8,3f8.2)',charsize,i,ilines,n_lines,lpnt[i],$ 
     120;                 wlen[i]+blen,sum+3*blen,xx2-xx1 
    118121    endfor         
    119122    case 1 of 
     
    131134for i=0,n_lines-1 do begin 
    132135  ii=where(lpnt eq i,nc) 
    133   maxlen=(total(wlen(ii))+nc*blen)>maxlen 
    134   lines(i)=string(f='(200a)',words(ii)+' ') 
    135 ; print,i,words(ii) 
    136 ; print,i,lines(i) 
     136  maxlen=(total(wlen[ii])+nc*blen)>maxlen 
     137  lines[i]=string(f='(200a)',words[ii]+' ') 
     138; print,i,words[ii] 
     139; print,i,lines[i] 
    137140endfor 
    138141 
     
    160163  for i_line = 0,n_lines-1 do begin 
    161164    yy = yy-dy 
    162 ;   print,xx,yy,lines(i_line),charsize 
    163     xyouts, xx, yy, lines(i_line), /device, charsize=charsize, $ 
     165;   print,xx,yy,lines[i_line],charsize 
     166    xyouts, xx, yy, lines[i_line], /device, charsize=charsize, $ 
    164167      alignment=align, color=color, font=-1, _extra = ex 
    165168  endfor 
Note: See TracChangeset for help on using the changeset viewer.