home bbs files messages ]

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,159 of 68,980   
   JJ to Herbert Kleebauer   
   Re: %random% is not random?   
   28 Nov 23 08:18:17   
   
   From: jj4public@outlook.com   
      
   On Mon, 27 Nov 2023 18:03:52 +0100, Herbert Kleebauer wrote:   
   >   
   > 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   
      
   Interresting. It seems like the first use of the randomizer is like using   
   timestamp solely for the random seed.   
      
   --- 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