Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.msdos.batch.nt    |    Fun with Windows NT batch files    |    68,980 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 68,158 of 68,980    |
|    Herbert Kleebauer to Tom Del Rosso    |
|    Re: %random% is not random?    |
|    27 Nov 23 18:03:52    |
      From: klee@unibwm.de              On 27.11.2023 16:50, Tom Del Rosso wrote:       > Herbert Kleebauer wrote:       >>       >> Then you have the same problem: the first %random% isn't       >> random. So better insert a "dummy=%random% at the start of       >> the batch.       >       > In an earlier version it saved a log with a graph output to show the       > pattern. It revealed that the second number wasn't very random either.              It is a pseudo random generator, the second value depends on       the first value.              @echo off       for /l %%i in (1,1,20) do (        cmd /c echo %%random%% %%random%% %%random%% %%random%%        timeout /t 1 >nul)              But the second value of %random% at least looks much more       random than the first one:              29515 13600 11704 18330       29518 24348 29568 9626       29521 2328 14664 921       29525 13077 32529 24984       29528 23825 17625 16280       29531 1806 2721 7575       29534 12554 20585 31638       29538 23302 5681 22934       29541 1283 23545 14229       29544 12031 8642 5524       29548 22780 26506 29588       29551 760 11602 20883       29554 11508 29466 12178       29557 22257 14562 3473       29561 237 32426 27537       29564 10986 17523 18832       29567 21734 2619 10127       29570 32483 20483 1423       29574 10463 5579 25486       29577 21211 23443 16781              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca