-
Notifications
You must be signed in to change notification settings - Fork 1
/
ramdisc06.zx.fs
executable file
·16 lines (11 loc) · 1.01 KB
/
ramdisc06.zx.fs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
( RANDOM NUMBER GENERATOR --
HIGH LEVEL )
0 VARIABLE RND HERE RND !
: RANDOM RND @ 31421 *
6927 + DUP RND ! ;
: CHOOSE ( U1 --- U2 )
RANDOM U* SWAP DROP ;
( WHERE CHOOSE RETURNS A
RANDOM INTEGER WITHIN THE
RANGE 0 = OR < U2 < U1. )
;S