;+ ;NAME: ; TEST_KEYWORD_RETURN ;PURPOSE: ; Test whether IDL can return a value through an output keyword to an ; array element. The answer is... NO! ;CALLING SEQUENCE: ; .run test_keyword_return ;HISTORY: ; 2006-May-30 C. Kankelborg ;Test procedure pro test, foo, bla=bla bla = total(foo) print,'The output of the BLA keyword should be: ',bla end ;Main script a = [0,1,2,3,4,5,6] test, a, bla=a[3] print,'With BLA=a[3], we find a[3] returns the value: ',a[3] end ; TEST RESULTS: ; ; IDL> .run test_keyword_return ; % Compiled module: TEST. ; % Compiled module: $MAIN$. ; The output of the BLA keyword should be: 21.0000 ; With BLA=a[3], we find a[3] returns the value: 3 ;-