comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: _Ref_Extra : BUG? (in Win2K 55b) corrected test file
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: _Ref_Extra : BUG? (in Win2K 55b) corrected test file [message #27744 is a reply to message #27740] Thu, 01 November 2001 09:00 Go to previous message
Martin Downing is currently offline  Martin Downing
Messages: 136
Registered: September 1998
Senior Member
Glad you didnt look too carefully, as the test file I sent was wrong
nyway - thought I had sent it *before* I started changing things, woops :(
I noticed though that the Keyword had been converted to a string on your
version.

The correct file is now on my web site, sorry - clearly not enough coffee
http://homepage.ntlworld.com/martin.downing/idl/test_ref_ext ra_bug.pro
code below:
http://homepage.ntlworld.com/martin.downing/idl/test_ref_ext ra_bug2.pro
the below test though is *maybe* easier to follow

Martin

;=====================================================
; demonstrates _REF_EXTRA 's keyword argument passing anomalies

; main test procedure
pro test_ref_extra_bug2, debug=debug
; set debug to give help output of passes extra parameters
test_extra0, /key, debug=debug
test_ref_extra2, /key, debug=debug
; THIS ONE MAY CRASH YOUR IDL SESSION
test_ref_extra1, /key, debug=debug
end

pro test_extra0, debug=debug,_EXTRA=e
print, "TEST_EXTRA0"
if keyword_set(debug) then help,e,/st
test_ref_extra1, debug=debug,_REF_EXTRA=e
end

pro test_ref_extra1, debug=debug,_REF_EXTRA=e
print, "TEST_REF_EXTRA1"
if keyword_set(debug) then help,e,/str; & if defined(e) then print, e
test_ref_extra2,debug=debug, _REF_EXTRA=e
end
pro test_ref_extra2, debug=debug,_REF_EXTRA=e
print, "TEST_REF_EXTRA2"
if keyword_set(debug) then help,e,/st ;& if defined(e) then print, e
test_extra1, _EXTRA=e
end

; the final call
pro test_extra1,key1=key1, debug=debug,_EXTRA=e
print, "TEST_EXTRA1"
if keyword_set(debug) then help,e,/st
if keyword_set(KEY1) then print, "KEY1 set - good!" else Print, "KEY1
unset"
end

===============================



Martin

>
> I haven't looked closely at this, but here are my results
> on linux idl v5.5:
>
> IDL> test_ref_extra_bug
> { x86 linux unix linux 5.5 Aug 28 2001 32 32}
> ;calling: test_extra, 3, /Key1
> TEST_EXTRA
> ** Structure <827ebdc>, 1 tags, length=2, data length=2, refs=1:
> KEY1 INT 1
> { 1}
> ;calling: test_ref_extra, 2, /Key1
> pro test_ref_ex,call, _REF_EXTRA=e
> E STRING = Array[1]
> pro test_ex,call, _EXTRA=e
> ** Structure <827ebdc>, 1 tags, length=2, data length=2, refs=1:
> KEY1 INT 1
> pro test_ref_ex,call, _REF_EXTRA=e
> ** Structure <827ebdc>, 1 tags, length=2, data length=2, refs=1:
> KEY1 INT 1
>
>
> Cheers,
> bob
>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: LINK : warning LNK4068: /MACHINE not specified; defaulting to IX86
Next Topic: Re: texture_coord

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:10:58 PDT 2025

Total time taken to generate the page: 0.00468 seconds