Changeset 74 for trunk/SRC/ToBeReviewed/STRUCTURE/mixstru.pro
- Timestamp:
- 05/23/06 15:45:47 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/STRUCTURE/mixstru.pro
r27 r74 60 60 ;------------------------------------------------------------ 61 61 FUNCTION mixstru, stru1, stru2 62 @cm_general 63 62 64 IF size(stru1, /type) EQ 0 AND size(stru2, /type) EQ 8 THEN return, stru2 63 65 IF size(stru2, /type) EQ 0 AND size(stru1, /type) EQ 8 THEN return, stru1 … … 65 67 if size(stru2, /type) NE 8 then return, -1 66 68 tname = tag_names(stru2) 67 res = ''68 rien = execute('res = get_extra('+tname[0]+'=stru2.(0), _extra = stru1)')69 if rien EQ 0 then stop70 if n_tags(stru2) GT 1 then begin 71 FOR i = 1, n_tags(stru2)-1 DO BEGIN72 rien = execute('res = get_extra('+tname[i]+'=stru2.(i), _extra = res)')73 if rien EQ 0 then stop74 endfor75 endif 69 70 str = '' 71 FOR i = 0, n_tags(stru2)-1 DO str = str + tname[i]+' = stru2.(' + strtrim(i, 2)+ '), ' 72 73 res = createfunc('get_extra('+str+'_extra = stru1)' $ 74 , kwdlist = 'stru1 = stru1, stru2 = stru2' $ 75 , stru1 = stru1, stru2 = stru2 $ 76 , filename = myuniquetmpdir +'for_createfunc.pro') 77 76 78 return, res 79 77 80 end
Note: See TracChangeset
for help on using the changeset viewer.