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

Home » Public Forums » archive » Arg_Present, XSurface, and Other Assorted Blunders
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: Arg_Present, XSurface, and Other Assorted B [message #9766 is a reply to message #9718] Tue, 12 August 1997 00:00 Go to previous message
wmc is currently offline  wmc
Messages: 117
Registered: February 1995
Senior Member
In article e54555e6d6bd26f9896d3@news.frii.com, davidf@dfanning.com (David Fanning) writes:
> Catch, error
> IF error NE 0 THEN BEGIN ; Can't find LoadData.
> data = DIST(41)
> x = Findgen(41)
> y = Findgen(41)
> ENDIF
>
> IF Arg_Present(data) EQ 0 THEN BEGIN
> data = LoadData(2)
> ENDIF

> here is what happens.

> When the call is first made, "data" is not present and
> Arg_Present reports this correctly. The LoadData error occurs
> and I bounce up to my error handler. I define "data" and
> continue. But Arg_Present *STILL* reports data as missing
> in action. This is so even when it is defined AND a variable
> that is passed by reference. As a result, my code goes into
> an infinite loop.

Um, forgive me here, since I'm still an IDL 4 person... but it looks like
arg_present is behaving quite correctly in this case. arg_present is supposed
to tell you if "data" is passed as an argument, no? And it isn't, even when
you define it within the error routine. Or have I missed something here?

- William, "he's still on 4.0" (but our system people are working on it)

---
William M Connolley | wmc@bas.ac.uk | http://www.nbs.ac.uk/public/icd/wmc/
Climate Modeller, British Antarctic Survey | Disclaimer: I speak for myself
[Message index]
 
Read Message
Read Message
Previous Topic: Problems with draw widget scrolling in IDL 5.0
Next Topic: Least Square

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

Current Time: Sat Oct 11 12:26:30 PDT 2025

Total time taken to generate the page: 1.12255 seconds