Changeset 371 for trunk/SRC/ToBeReviewed/STRUCTURE
- Timestamp:
- 08/07/08 11:32:02 (16 years ago)
- Location:
- trunk/SRC/ToBeReviewed/STRUCTURE
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/STRUCTURE/chkstru.pro
r327 r371 37 37 ; 38 38 ; @examples 39 ; test = { a:1, b:2, c:3 } 40 ; required = ['a','c'] 41 ; if CHKSTRU(test,required) then print,'found a and c.' 42 ; IDL> print, CHKSTRU(test,'b') 39 ; 40 ; IDL> test = { a:1, b:2, c:3 } 41 ; IDL> required = ['a','c'] 42 ; IDL> if CHKSTRU(test,required) then print,'found a and c.' 43 ; IDL> print, CHKSTRU(test,'b') 43 44 ; 1 44 ; 45 ; IDL> print, CHKSTRU(test,'b',/extract) 45 46 ; 2 46 47 ; -
trunk/SRC/ToBeReviewed/STRUCTURE/extractstru.pro
r327 r371 25 25 ; @examples 26 26 ; 27 ; 28 ; 27 ; IDL> extra=get_extra(/ok, year=1999, age_capitaine=35 ) 28 ; IDL> help, extra,/struct 29 29 ; ** Structure <83e66bc>, 3 tags, length=6, refs=1: 30 30 ; AGE_CAPITAINE INT 35 31 31 ; OK INT 1 32 32 ; YEAR INT 1999 33 ; 33 ; IDL> help, extractstru(extra,['ok','hhuihi','YEAR']),/stru 34 34 ; ** Structure <831afac>, 1 tags, length=2, refs=1: 35 35 ; AGE_CAPITAINE INT 35 36 ; 36 ; IDL> help, extractstru(extra,['ok','hhuihi','YEAR'],/keep),/stru 37 37 ; ** Structure <834bbc4>, 2 tags, length=4, refs=1: 38 38 ; OK INT 1 -
trunk/SRC/ToBeReviewed/STRUCTURE/mixstru.pro
r325 r371 26 26 ; @examples 27 27 ; 28 ; 29 ; 30 ; 28 ; IDL> a=get_extra(/toto,ok=123) 29 ; IDL> b=get_extra(ok=111, year=1999, age_capitaine=35) 30 ; IDL> help, a,b,/struct 31 31 ; ** Structure <8334424>, 2 tags, length=4, refs=1: 32 32 ; OK INT 123 … … 36 36 ; OK INT 111 37 37 ; YEAR INT 1999 38 ; 38 ; IDL> help, mixstru(a,b),/struct 39 39 ; ** Structure <82f25ac>, 4 tags, length=8, refs=1: 40 40 ; AGE_CAPITAINE INT 35 … … 42 42 ; OK INT 123 43 43 ; TOTO INT 1 44 ; 44 ; IDL> help, mixstru(b,a),/struct 45 45 ; ** Structure <834604c>, 4 tags, length=8, refs=1: 46 46 ; TOTO INT 1 -
trunk/SRC/ToBeReviewed/STRUCTURE/struct2string.pro
r327 r371 25 25 ; @examples 26 26 ; 27 ; 27 ; IDL> print, struct2string(!d) 28 28 ; create_struct('NAME','X','X_SIZE',891,'Y_SIZE',630,'X_VSIZE' 29 29 ; ,891,'Y_VSIZE',630,'X_CH_SIZE',6,'Y_CH_SIZE',10,'X_PX_CM' -
trunk/SRC/ToBeReviewed/STRUCTURE/where_tag.pro
r262 r371 41 41 ; 42 42 ; @examples 43 ; Suppose STR is a structure with tags CAT_NO:indgen(10), and44 ; NAME:strarr(10). Find the indices where STR.CAT_NO is45 ; between 3 and 5.46 43 ; 47 ; IDL> print, WHERE_TAG( str, TAG_NAME = 'CAT_NO', VALUE = [3,4,5] ) ;or 48 ; IDL> print, WHERE_TAG( str, TAG_NUM = 0, RANGE = [3,5]) 44 ; Suppose STR is a structure with tags CAT_NO:indgen(10), and 45 ; NAME:strarr(10). Find the indices where STR.CAT_NO is between 3 and 5. 46 ; 47 ; IDL> print, WHERE_TAG( str, TAG_NAME = 'CAT_NO', VALUE = [3,4,5] ) 48 ; or 49 ; IDL> print, WHERE_TAG( str, TAG_NUM = 0, RANGE = [3,5]) 49 50 ; 50 51 ; @history
Note: See TracChangeset
for help on using the changeset viewer.