Return to random.fs CVS log | Up to [gforth] / gforth |
* Added some files: * ecvt.c provides some functions for DJGPP under DOS * tt.fs is Tetris (from PFE) * checkans.fs allows to check, which words of the ANSI wordsets are present * the rest are other tools
1: \ generates random numbers 12jan94py 2: 3: Variable seed 4: 5: $10450405 Constant generator 6: 7: : rnd ( -- n ) seed @ generator um* drop 1+ dup seed ! ; 8: 9: : random ( n -- 0..n-1 ) rnd um* nip ;