Changeset 150 for trunk/SRC/ToBeReviewed/STRUCTURE/chkstru.pro
- Timestamp:
- 08/09/06 12:12:54 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/STRUCTURE/chkstru.pro
r134 r150 1 ; $Id$2 1 ;------------------------------------------------------------- 3 2 ;+ 4 ; NAME: 5 ; CHKSTRU (function) 3 ; @file_comments 4 ; check validity of a structure and test if necessary 5 ; fields are contained 6 6 ; 7 ; PURPOSE: 8 ; check validity of a structure and test if necessary 9 ; fields are contained 7 ; @categories 8 ; tools 10 9 ; 11 ; CATEGORY: 12 ; tools 10 ; @param STRUCTURE {in}{required} 11 ; The structure to be tested. If STRUCTURE is 12 ; not of type structure, the function will return 0 13 13 ; 14 ; CALLING SEQUENCE: 15 ; res=CHKSTRU(STRUCTURE,FIELDS [,/VERBOSE]) 14 ; @param FIELDS {in}{required} 15 ; A string or string array with field names to 16 ; be contained in STRUCTURE. CHKSTRU returns 1 (true) 17 ; only if all field names are contained in STRUCTURE. 18 ; The entries of FIELDS may be upper or lowercase. 16 19 ; 17 ; INPUTS: 18 ; STRUCTURE --> the structure to be tested. If STRUCTURE is 19 ; not of type structure, the function will return 0 20 ; @keyword INDEX 21 ; A named variable that will contain the indices of 22 ; the required field names in the structure. They can then 23 ; be assessed through structure.(index[i]) . Index will 24 ; contain -1 for all fields entries that are not in the 25 ; structure. 20 26 ; 21 ; FIELDS --> a string or string array with field names to 22 ; be contained in STRUCTURE. CHKSTRU returns 1 (true) 23 ; only if all field names are contained in STRUCTURE. 24 ; The entries of FIELDS may be upper or lowercase. 27 ; @keyword VERBOSE 28 ; set this keyword to return an error message 29 ; in case of an error. 25 30 ; 26 ; KEYWORD PARAMETERS: 27 ; INDEX --> a named variable that will contain the indices of 28 ; the required field names in the structure. They can then 29 ; be assessed through structure.(index[i]) . Index will 30 ; contain -1 for all fields entries that are not in the 31 ; structure. 31 ; @keyword EXTRACT 32 ; set this keyword to extract a fields from the 33 ; structure. -1 is return is fields or structure. are 34 ; incorrect. 32 35 ; 33 ; /VERBOSE --> set this keyword to return an error message34 ; in case of an error.36 ; @returns 37 ; CHKSTRU returns 1 if successful, otherwise 0. 35 38 ; 36 ; /EXTRACT --> set this keyword to extract a fields from the 37 ; structure. -1 is return is fields or structure. are 38 ; incorrect. 39 ; 40 ; OUTPUTS: 41 ; CHKSTRU returns 1 if successful, otherwise 0. 42 ; 43 ; SUBROUTINES: 44 ; 45 ; REQUIREMENTS: 46 ; 47 ; NOTES: 48 ; 49 ; EXAMPLE: 39 ; @examples 50 40 ; test = { a:1, b:2, c:3 } 51 41 ; required = ['a','c'] … … 56 46 ; 2 57 47 ; 58 ; MODIFICATION HISTORY:48 ; @history 59 49 ; mgs, 02 Mar 1998: VERSION 1.00 60 50 ; mgs, 07 Apr 1998: - second parameter (FIELDS) now optional 61 51 ; 12 Jan 2001: EXTRACT keyword by S. Masson (smasson@lodyc.jussieu.fr) 52 ; 53 ; @version 54 ; $Id$ 62 55 ; 63 56 ;-
Note: See TracChangeset
for help on using the changeset viewer.