File:  [gforth] / gforth / random.fs
Revision 1.1: download - view: text, annotated - select for diffs
Tue Nov 29 16:49:48 1994 UTC (29 years, 4 months ago) by pazsan
Branches: MAIN
CVS tags: HEAD
* 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 ;

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>