Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- procedure w_rand(lo: integer; hi: integer) is
- variable R: real;
- variable S1, S2, c: positive := 55;
- begin
- uniform(S1, S2, R);
- R := R * real(hi - lo) + real(lo);
- c := positive(floor(R));
- loop
- w;
- c := c - 1;
- exit when c = 1;
- end loop;
- end;
Add Comment
Please, Sign In to add comment