' Clay Clear ' Couple Of Procedures For Quads #IF 0 The first function is a replacement for FORMAT$(q&&, "#,") that returns ALL possible 19 digits of a QUAD number. It works just like the FORMAT$() format above, except that it does not do rounding, and instead correctly shows all possible 19 digits. The second function is simply a replacement for HEX$(), except that it will accept the full range of numbers for a QUAD, unlike the PB HEX$() command, which only supports up to 32-bits. In other words, it will return all 16 hex characters. This source code is released to the Public Domain. #ENDIF FUNCTION FormatQ (BYVAL A AS QUAD) EXPORT AS STRING FUNCTION = "" LOCAL flagnegative AS LONG flagnegative = ISTRUE(A < 0) A = ABS(A) LOCAL L AS LONG, s1 AS STRING L = (A \ (10^18)) A = (A MOD (10^18)) s1 = RIGHT$(REPEAT$(6, "000,") + FORMAT$(A, "#,"), (6 * 3) + 5) s1 = FORMAT$(L) + "," + s1 L = INSTR(s1, ANY "123456789") IF ISTRUE L THEN s1 = MID$(s1, L) ELSE s1 = "0" END IF IF flagnegative THEN s1 = "-" + s1 FUNCTION = s1 END FUNCTION FUNCTION HexQ (BYVAL A AS QUAD) EXPORT AS STRING LOCAL dhigh AS DWORD, dlow AS DWORD ! push dword ptr A[0] ! pop dlow ! push dword ptr A[4] ! pop dhigh FUNCTION = HEX$(dhigh, 8) + HEX$(dlow, 8) END FUNCTION