FUNCTION FXBTDIM, TDIM_KEYWORD ; ON_ERROR,2 ; ; Make sure TDIM_KEYWORD is not an array. ; IF N_ELEMENTS(TDIM_KEYWORD) NE 1 THEN MESSAGE, $ 'TDIM_KEYWORD must be a scalar' ; ; Remove any leading or trailing blanks from the keyword. ; TDIM = STRTRIM(TDIM_KEYWORD,2) ; ; The first and last characters should be "(" and ")". If they are not, then ; simply return the string as is. ; FIRST = STRMID(TDIM,0,1) LAST = STRMID(TDIM,STRLEN(TDIM)-1,1) IF (FIRST NE "(") OR (LAST NE ")") THEN RETURN,TDIM ; ; Otherwise, remove the parentheses characters. ; TDIM = STRMID(TDIM,1,STRLEN(TDIM)-2) ; ; Get the first value. ; VALUE = GETTOK(TDIM,',') ; ; Get all the rest of the values. ; WHILE TDIM NE '' DO VALUE = [VALUE,GETTOK(TDIM,',')] ; ; Return the (string) array of values. ; RETURN,VALUE END