UBI EasyCoder 201 IIE Manuel d'instructions Page 217

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 332
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 216
Intermec Fingerprint v7.61 Programmers Reference Manual Ed. 7 215
Chapter 2 Program Instructions
RANDOMIZE
Field of Application
Statement for reseeding the random number generator, optionally
with a speci ed value.
Syntax RANDOMIZE[<nexp>]
<nexp> is the integer (0 -99999999) with which the random number
generator will be reseeded
Remarks
If no value is speci ed, a message will appear asking you to enter a value
between 0 and 99,999,999.
Examples
In the following example, no reseeding integer is speci ed in the program.
Thus a prompt will appear, asking you to do so:
10 RANDOMIZE
20 A%=RANDOM1,100)
30 PRINT A%
RUN
Random Number Seed (0 to 99999999) ?
Enter 555
yields for example:
36
When the reseeding integer is speci ed, no prompt will appear:
10 RANDOMIZE 556
20 A%=RANDOM(1,100)
30 PRINT A%
RUN
yields for example:
68
A higher degree of randomization will be obtained in the random integer
generator is reseeded with a more or less random integer, for example
provided by a TICKS function:
10 A%=TICKS
20 RANDOMIZE A%
30 B%=RANDOM(1,100)
40 PRINT B%
RUN
yields for example:
42
Vue de la page 216
1 2 ... 212 213 214 215 216 217 218 219 220 221 222 ... 331 332

Commentaires sur ces manuels

Pas de commentaire