<<prev file | next file >>    view single page | view frames    summary: fields | routine    details: routine

ToBeReviewed/STRUCTURE/

mixstru.pro

Concatenate 2 structures together. The difference with CREATE_STRUCT is that if the 2 structure have same elements's name, then mixstru do not break down but choose for the common element the value specified by the first structure.

topmixstru Structure

result = mixstru(stru1, stru2)

Return value

A structure

Parameters

stru1        in required

Structure which can have same elements's name than STRU2 but with a different value.

stru2        in required

Structure which can have same elements's name than STRU1 but with a different value.

Examples

IDL> a=get_extra(/toto,ok=123) IDL> b=get_extra(ok=111, year=1999, age_capitaine=35) IDL> help, a,b,/struct ** Structure <8334424>, 2 tags, length=4, refs=1: OK INT 123 TOTO INT 1 ** Structure <8373da4>, 3 tags, length=6, refs=1: AGE_CAPITAINE INT 35 OK INT 111 YEAR INT 1999 IDL> help, mixstru(a,b),/struct ** Structure <82f25ac>, 4 tags, length=8, refs=1: AGE_CAPITAINE INT 35 YEAR INT 1999 OK INT 123 TOTO INT 1 IDL> help, mixstru(b,a),/struct ** Structure <834604c>, 4 tags, length=8, refs=1: TOTO INT 1 AGE_CAPITAINE INT 35 OK INT 111 YEAR INT 1999

Version history

Version

$Id: mixstru.pro 163 2006-08-29 12:59:46Z navarro $

History

Sebastien Masson (smasson@lodyc.jussieu.fr) 7/10/1999

Known issues

Restrictions

If STRU1 or STRU2 is not a structure, mixstru send back -1

Statistics

McCabe cyclic 6
McCabe essential 1
McCabe modular design 1
Produced by IDLdoc 2.0.