Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function GenID():String;
- var b,x:byte;
- begin
- Result := '{';
- Randomize;
- for b:= 1 to 8 do
- begin
- if Random(100) > 50 then Result := Result + chr(RandomRange(48,57))
- else Result := Result + chr(RandomRange(65,90));
- end;
- Result := Result + '-';
- for x:= 1 to 3 do
- begin
- for b:= 1 to 4 do
- begin
- if Random(100) < 50 then Result := Result + chr(RandomRange(48,57))
- else Result := Result + chr(RandomRange(65,90));
- end;
- Result := Result + '-';
- end;
- for b:= 1 to 12 do
- begin
- if Random(100) < 50 then Result := Result + chr(RandomRange(48,57))
- else Result := Result + chr(RandomRange(65,90));
- end;
- Result := Result + '}';
- end;
Advertisement
Add Comment
Please, Sign In to add comment