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

   
2
333
.55
tttTTT
4444 444k
EOF
