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

Home » Public Forums » archive » Re: Scope_VarFetch Bug or Feature?
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: Scope_VarFetch Bug or Feature? [message #47507 is a reply to message #47506] Tue, 14 February 2006 14:22 Go to previous messageGo to previous message
Robert Barnett is currently offline  Robert Barnett
Messages: 70
Registered: May 2004
Member
Dear David,

I think that the trick is to test for the number of elements returned
from Scope_VarFetch before you assign it to a variable.

;*****************************************************
PRO test01

names = Scope_Varname(Level=1,Count=varcount)
FOR j=0,varcount-1 DO BEGIN
s = n_elements(Scope_VarFetch(names[j], Level=1, /Enter))
Print, 'Fetching variable ' + names[j] + ' with n_elements ' +
string(s)
if (s gt 0) then begin
mainvar = Scope_VarFetch(names[j], Level=1)
Help, mainvar
endif
ENDFOR

END
;*****************************************************

Cheers
Robbie
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: [OT] english and spanish; was: Leer archivos ASCII
Next Topic: XYOUTS Decimal format

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

Current Time: Fri Oct 10 05:45:22 PDT 2025

Total time taken to generate the page: 7.28187 seconds