I saw this code when I learned the ProcessMessage function. I didn't use the Randomize function, so I learned it by the way;
Procedure TForm1.Button1Click (Sender: TObject); var I, J, X, Y: Word; begin I: = 0; J: = 0; while I begin
Randomize statement
Initializes a random number generator.
Randomize [number]
The number argument can be any valid numeric expression.
Description
Randomize Initializes the Rnd function by using the number parameter to assign a new seed value
Instance
The code is as follows
Copy Code
RandomizeIp=int (225*RND) +25& "." &int (225*RND) +25& "." &int (225*RND) +25& "." &int (225*RND) +25Response.Write (IP)%>
About Randomize
Initializes a random number
Technorati tags: randomize, VBA, random number
The randomize statement initializes the random number generator. the instruction int (maxnum-minnum + 1) * RND + minnum) uses the RND function to generate a random value from the specified minnum to
Randomize statement
Initialize the random number generator.
Randomize[Number]
NumberA parameter can be any valid numeric expression.Description
RandomizeUseNumberParameter initializationRndThe random number generator of the function, which is
Randomize sequence elements using the random_shuffle () Algorithm
Responsible editor: NCIC updated on: 2007-4-2
Suppose you need to specify a random number in the range. The traditional method is to use the anss C function random ()
Delphi function manual
Handle exceptions caused by the abort Function
ABS function absolute value function
The addexitproc function adds a process to the End Process Table of the runtime database.
The ADDR function returns the address of the
ASP function rnd ()
function rnd () returns a random number from 0 to 1.
Use the following methods:
Copy Code code as follows:
Response.Write Rnd () ' Its possible return value: 0.2357746
If you want to use the Rnd ()
In C, the rand () function can be used to generate a random number, but this is not a random number in the true sense, it is a pseudo-random number, is a number, we can call it a seed, as a reference to a recursive formula derived from a coefficient,
ASP function Encyclopedia
ASP functions are similar to VBScript, and here are some common functions
Array ()
function returns an array of
Expression Array (list)
Allow data types: characters, numbers can
Example:
Dim MyArray (
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.