? longtohex(-77442022681) Procedure longtohex Lparameters tnNumber Return Transform(m.tnNumber/(0xFFFFFFFF + 1) - IIF(m.tnNumber<0,1,0),'@0')+; RIGHT(Transform(m.tnNumber%(0xFFFFFFFF + 1),'@0'),8)However I wouldn't trust VFP (more precisely to my own coding in VFP) with such big numbers. I would instead use a C FLL or C# COM component. ie: Here is a sample C# COM for such:
using System; using System.Runtime.InteropServices; namespace vfpHexUtil { [ClassInterface(ClassInterfaceType.AutoDual)] [ProgId("cbVFPCOM.cbNumConverter")] [ComVisible(true)] public class cbNumConverter { public string I64ToHex(Int64 number) { return number.ToString("X").PadLeft(16,'0'); } } }-You can write this code usign notepad (or better yet download C# express for free so you don't have to do all these manually from command line) and save as say as "mynumconverter.cs"
o = createobject("cbVFPCOM.cbNumConverter") myHexString = o.I64ToHex(-77442022681) ? m.myHexStringCetin