Random number generator
chen
chunhuichen at 126.com
Sun Nov 4 01:54:42 UTC 2007
Syntax
Random(min,max)
Description
Returns a Long value greater than or equal to min and less than or equal to max.
Comments
Both the min and max parameters are rounded to Long. A runtime error is generated if min is greater than max.
Example
'This example uses the random number generator to generate ten
'lottery numbers.
Const crlf = Chr$(13) + Chr$(10)
Sub Main()
Randomize 'Start with new random seed.
For x = 1 To 10
y = Random(0,100) 'Generate numbers.
message = message & y & crlf
Next x
MsgBox "Ten numbers for the lottery: " & crlf & message
End Sub
--
Chunhui Chen
______________
Beijing Normal University
&
University of California, Irvine
在2007-11-04,"c.wahlheim (Jacoby Lab @ Wash U)" <c.wahlheim at gmail.com> 写道:
Hi,
I am fairly new to ePrime and brand new to this group. I am trying to
program an experiment in which false feedback is given to incorrect
responses on a recognition memory test. Specifically, I would like
the false feedback "correct" to only be displayed 85% of the time that
an incorrect response is produced (e.g., false alarm, miss). I was
thinking that I could use a random number generator along with an "if"
command to do this. Does anyone know how to write the inline code for
a random number generator?
Thanks,
Chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com
To unsubscribe from this group, send email to e-prime-unsubscribe at googlegroups.com
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en
-~----------~----~----~----~------~----~------~--~---
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20071104/08d343b9/attachment.htm>
More information about the Eprime
mailing list