func$ hex h .
   for d in [ h div 16 h mod 16 ]
      if d > 9
         d += 7
      .
      h$ &= strchar (d + 48)
   .
   return h$
.
proc unichar s$ . .
   len d[] 65536
   s$[] = strchars s$
   for i to len s$[]
      h = strcode s$[i]
      if d[h] <> 0
         write " --> duplicates: '" & s$[i] & "' (" & hex h & "h)"
         print "'  positions: " & d[h] & ", " & i
         return
      .
      d[h] = i
   .
   print "ok"
.
repeat
   s$ = input
   until s$ = "EOF"
   print "'" & s$ & "'" & " length " & len s$
   unichar s$
   print ""
.
input_data

.
abcABC
XYZ ZYX
1234567890ABCDEFGHIJKLMN0PQRSTUVWXYZ
EOF
