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

Home » Public Forums » archive » Re: weird behaviour with cgdemodata
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: weird behaviour with cgdemodata [message #76620 is a reply to message #76619] Tue, 21 June 2011 08:19 Go to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
The problem is that the "input" parameter to cgdemodata is really an input-output parameter -- it is modified by cgdemodata(). For example,

IDL> i = 1 & print,N_elements(cgdemodata(i)) & print,i
101
0

The offending code in cgdemodata() is below. It should probably be rewritten so that the "number" parameter is left unmodified

FUNCTION cgDemoData_ReadData, number

IF N_Params() EQ 1 THEN BEGIN
type = Size(number)
type = type( type(0) + 1 )
IF type EQ 0 THEN Message, 'Supplied argument is undefined.'
IF type GT 5 THEN Message, 'Supplied argument must be a number.'
number = number - 1
number = 0 > number < 24
data = cgDemoData_ReadData(number)
RETURN, data
ENDIF
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Composite images
Next Topic: IDL IMAGE NAVIGATION

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

Current Time: Wed Oct 08 15:57:34 PDT 2025

Total time taken to generate the page: 0.00425 seconds