ingushmen

Untitled

May 8th, 2014
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. function GenID():String;
  2. var b,x:byte;
  3. begin
  4. Result := '{';
  5. Randomize;
  6. for b:= 1 to 8 do
  7. begin
  8. if Random(100) > 50 then Result := Result + chr(RandomRange(48,57))
  9. else Result := Result + chr(RandomRange(65,90));
  10. end;
  11. Result := Result + '-';
  12. for x:= 1 to 3 do
  13. begin
  14. for b:= 1 to 4 do
  15. begin
  16. if Random(100) < 50 then Result := Result + chr(RandomRange(48,57))
  17. else Result := Result + chr(RandomRange(65,90));
  18. end;
  19. Result := Result + '-';
  20. end;
  21. for b:= 1 to 12 do
  22. begin
  23. if Random(100) < 50 then Result := Result + chr(RandomRange(48,57))
  24. else Result := Result + chr(RandomRange(65,90));
  25. end;
  26. Result := Result + '}';
  27. end;
Advertisement
Add Comment
Please, Sign In to add comment