Re: rand()
On Mon, Jul 28, 2008 at 10:54 PM, Bobby <cybercruiserz@xxxxxxxxx> wrote:
Hi all,
How do I use the rand function to print out more than one random number for an array? In the example script below i have an array @nums with a list of numbers; how do i print out more than one random numbers from that list (@nums)? Thanks.
You may need srand before the rand function.
--
Regards,
Jeff. - Peng.Kyo@xxxxxxxxx
.
Relevant Pages
- Re: Generate two random number and multiply
... To generate pseudo-random integer values, use the rand function. ... it's recommended to invoke the srand function to ... To select a string, from a collection randomly, you can use the same ... bounds of your array of strings and use it to index into the array and ... (comp.lang.c) - Re: rand()
... How do I use the rand function to print out more than one random number ... for an array? ... In the example script below i have an array @nums with a list of ... use warnings; ... (perl.beginners) - Re: rand()
... Newsgroups: perl.beginners ... How do I use the rand function to print out more than one random number for an array? ... You can use 'shuffle' from List::Util. ... (perl.beginners) - Re: rand()
... In article, Bobby ... How do I use the rand function to print out more than one random number for ... an array? ... print "$randnum \n"; ... (perl.beginners) - Re: Logon script - function array and select case not working
... this all works well, except, the function i am using for the rules in the control script causes alot of querrys to AD. as there are alot of groups. ... objTSout.writeline retrv ... So if you think that this will assign an array value to the variable, how do you think the case select statement is going go compare this array value with the literal string values such as "group name here"? ... However, by not assigning ANY value to checkgrp in the function, you are guaranteeing that, should the function ever exit, it will return no information. ... (microsoft.public.scripting.vbscript) |
|