Skip to content

Instantly share code, notes, and snippets.

@flyx
Created July 8, 2012 22:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flyx/3073170 to your computer and use it in GitHub Desktop.
Save flyx/3073170 to your computer and use it in GitHub Desktop.
with Ada.Text_IO;
with Ada.Numerics.Discrete_Random;
procedure Test is
subtype Random_Range is Integer range -10 .. 10;
package Random_X is new Ada.Numerics.Discrete_Random(Random_Range);
use Random_X;
Gen : Generator;
begin
loop
Reset (Gen);
Ada.Text_IO.Put_Line (Random (Gen)'Img);
end loop;
end Test;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment