Last change
on this file since 271 was
237,
checked in by pinsard, 17 years ago
|
replace some print by some report in some .pro (continuation) + improvements/corrections of some *.pro headers
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Id
|
File size:
1.5 KB
|
Line | |
---|
1 | ;+ |
---|
2 | ; |
---|
3 | ; @file_comments |
---|
4 | ; Allows to reattribute global variables associated with a field |
---|
5 | ; when we give a structure created by <pro>saveatt</pro> by example. |
---|
6 | ; |
---|
7 | ; @categories |
---|
8 | ; Utilities |
---|
9 | ; |
---|
10 | ; @param STRUCT {in}{required} |
---|
11 | ; a structure like the one who read <pro>litchamp</pro>. |
---|
12 | ; See IDL> xhelp,'litchamp' |
---|
13 | ; |
---|
14 | ; @uses |
---|
15 | ; common.pro |
---|
16 | ; |
---|
17 | ; @restrictions |
---|
18 | ; Change the value if global variables attribute of a field: vargrid, |
---|
19 | ; varname, varunit, vardate, varexp , valmask and time. |
---|
20 | ; |
---|
21 | ; @history |
---|
22 | ; Sebastien Masson (smasson\@lodyc.jussieu.fr) |
---|
23 | ; 15/6/1999 |
---|
24 | ; |
---|
25 | ; @version |
---|
26 | ; $Id$ |
---|
27 | ; |
---|
28 | ;- |
---|
29 | ; |
---|
30 | PRO restoreatt, struct |
---|
31 | ; |
---|
32 | compile_opt idl2, strictarrsubs |
---|
33 | ; |
---|
34 | @common |
---|
35 | ;------------------------------------------------------------ |
---|
36 | nomelements = tag_names(struct) |
---|
37 | for i = 0, n_tags(struct)-1 do begin |
---|
38 | case strlowcase(strmid(nomelements[i], 0, 1)) of |
---|
39 | 'g':vargrid = strupcase(struct.(i)) |
---|
40 | 'n':varname = struct.(i) |
---|
41 | 'u':varunit = struct.(i) |
---|
42 | 'e':varexp = struct.(i) |
---|
43 | 'm':valmask = struct.(i) |
---|
44 | 'd':BEGIN |
---|
45 | if size(struct.(i),/type) EQ 7 THEN BEGIN |
---|
46 | vardate = struct.(i) |
---|
47 | ENDIF ELSE BEGIN |
---|
48 | vardate = 'time series' |
---|
49 | time = struct.(i) |
---|
50 | ENDELSE |
---|
51 | end |
---|
52 | ELSE:BEGIN |
---|
53 | ras = report('Le nom '+nomelements[i]+' ne correspont a aucun element reconnu de la structure. !C cf. IDL> xhelp, ''litchamp''') |
---|
54 | end |
---|
55 | endcase |
---|
56 | endfor |
---|
57 | ;------------------------------------------------------------ |
---|
58 | return |
---|
59 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.