private static int printSourceNumber(String source, int offset, StringBuffer sb) {
   double number = 0.0;
   char type = source.charAt(offset);
   ++offset;
   if (type == 'S') {
     if (sb != null) {
       number = source.charAt(offset);
     }
     ++offset;
   } else if (type == 'J' || type == 'D') {
     if (sb != null) {
       long lbits;
       lbits = (long) source.charAt(offset) << 48;
       lbits |= (long) source.charAt(offset + 1) << 32;
       lbits |= (long) source.charAt(offset + 2) << 16;
       lbits |= (long) source.charAt(offset + 3);
       if (type == 'J') {
         number = lbits;
       } else {
         number = Double.longBitsToDouble(lbits);
       }
     }
     offset += 4;
   } else {
     // Bad source
     throw new RuntimeException();
   }
   if (sb != null) {
     sb.append(ScriptRuntime.numberToString(number, 10));
   }
   return offset;
 }