[ascoders] Re: Basis konvertieren

  • From: Manuel.Dahm@xxxxxxxxxxx (Manuel Dahm)
  • To: <ascoders@xxxxxxxxxxxxx>
  • Date: Fri, 7 Mar 2003 19:49:25 +0100

Aloha,


ausm Koffer:

Math.dec2hex = function (dec)
{
 var hex, dec1;
 while (dec > 0)
 {
  dec1 = dec % 16;
  if (dec1 > 9)
  {
   dec1 = substring ("ABCDEF", (dec1 - 9), 1);
  }
  hex = dec1 add hex;
  dec = int (dec / 16);
 }
 return hex;
};


d = "16711680";
h = Math.dec2hex (d);
trace (h);


gruß
Manuel


------------------------------------------------------
Archiv   : //www.freelists.org/archives/ascoders/
Optionen : //www.freelists.org/list/ascoders
------------------------------------------------------

Other related posts: