02.10.2012 Views

Programmer's Reference Manual Intermec Fingerprint® v8.70.0 ...

Programmer's Reference Manual Intermec Fingerprint® v8.70.0 ...

Programmer's Reference Manual Intermec Fingerprint® v8.70.0 ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

RANDOMIZE<br />

Chapter —Program Instructions<br />

Purpose Statement for reseeding the random number generator, optionally with a<br />

specified value.<br />

Syntax RANDOMIZE[]<br />

is the integer (0 -99999999) with which the random number<br />

generator will be reseeded<br />

Remarks If no value is specified, a message will appear asking you to enter a value<br />

between 0 and 99,999,999.<br />

Examples In the following example, no reseeding integer is specified in the program.<br />

Thus a prompt will appear, asking you to do so:<br />

10 RANDOMIZE<br />

20 A%=RANDOM1,100)<br />

30 PRINT A%<br />

RUN<br />

Random Number Seed (0 to 99999999) ?<br />

Enter 555<br />

yields for example:<br />

36<br />

When the reseeding integer is specified, no prompt will appear:<br />

10 RANDOMIZE 556<br />

20 A%=RANDOM(1,100)<br />

30 PRINT A%<br />

RUN<br />

yields for example:<br />

68<br />

A higher degree of randomization will be obtained in the random integer<br />

generator is reseeded with a more or less random integer, for example provided<br />

by a TICKS function:<br />

10 A%=TICKS<br />

20 RANDOMIZE A%<br />

30 B%=RANDOM(1,100)<br />

40 PRINT B%<br />

RUN<br />

yields for example:<br />

42<br />

<strong>Intermec</strong> Fingerprint <strong>v8.70.0</strong>/v10.0.0 Programmer´s <strong>Reference</strong> <strong>Manual</strong> 1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!