Changeset 771 for ccr


Ignore:
Timestamp:
May 20, 2010, 5:45:02 PM (14 years ago)
Author:
George Lilly
Message:

new UUID from Wally.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ccr/trunk/p/C0CUTIL.m

    r767 r771  
    2222 Q
    2323 ;
    24 UUID() ; GENERATE A RANDOM UUID (Version 4)
     24UUID()  ; thanks to Wally for this.
     25        N R,I,J,N
     26        S N="",R="" F  S N=N_$R(100000) Q:$L(N)>64
     27        F I=1:2:64 S R=R_$E("0123456789abcdef",($E(N,I,I+1)#16+1))
     28        Q $E(R,1,8)_"-"_$E(R,9,12)_"-4"_$E(R,14,16)_"-"_$E("89ab",$E(N,17)#4+1)_$E(R,18,20)_"-"_$E(R,21,32)
     29        ;
     30OLDUUID() ; GENERATE A RANDOM UUID (Version 4)
    2531 N I,J,ZS
    2632 S ZS="0123456789abcdef" S J=""
Note: See TracChangeset for help on using the changeset viewer.