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

Home » Public Forums » archive » RANDOMU bug (and HTML help)
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: RANDOMU bug (and HTML help) [message #14399 is a reply to message #14330] Wed, 24 February 1999 00:00 Go to previous messageGo to previous message
steinhh is currently offline  steinhh
Messages: 260
Registered: June 1994
Senior Member
Bill Thompson wrote:

> Naively, I expected that
> if one deleted the seed variable, that would force IDL to re-initialize the
> seed, based on the system time or whatever. However, if my next command is
>
> IDL> delvar,seed & print,randomu(seed,3)
>
> I don't get any random numbers at all. To start getting random
> numbers again,
> I have to use a completely new variable name for the seed, e.g.
>
> IDL> print,randomu(seed2,3)
> 0.671149 0.383416 0.631635
>
> I don't know if this is properly speaking a bug or not, but it's certainly
> weird. As far as I can tell, this behavior is seen in all versions of IDL.

At first, I didn't understand what you were saying here - what could you
mean by "I don't get any random numbers at all"? Was it the same number
over and over again, or what? (In retrospect, I see that this is an
incorrect interpretation of the sentence..) Then I tried it myself:

IDL> delvar,seed & print,randomu(seed,3)

- and *no* output (hence "no random numbers at all")!

Seems like the guy who wrote the DELVAR command did something quite
bizarre:

IDL> delvar,seed & print,"HI"

- *still* no output!

Luckily, DELVAR cannot be used in programs!

Regards,

Stein Vidar
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL Insight bug when plotting horizontal lines?
Next Topic: Re: beginners plotting question

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

Current Time: Fri Oct 10 02:53:15 PDT 2025

Total time taken to generate the page: 7.35837 seconds