lisp2arx
Visual Programming for AutoLisp Mathématiques en programmation Lisp.. doc2cpp,doc2lsp, sld2lsp, bmp2dcl, free__GifCcapture for all-CAD'platforms..
Lista Forumurilor Pe Tematici
lisp2arx | Reguli | Inregistrare | Login

POZE LISP2ARX

Nu sunteti logat.
Nou pe simpatie:
lavinia.monica
Femeie
24 ani
Timis
cauta Barbat
26 - 67 ani
lisp2arx / Delphi , InnoPascal / Delphi32-fast 6x inttostr.  
Autor
Mesaj Pagini: 1
admin
Administrator

Din: Bucharest
Inregistrat: acum 13 ani
Postari: 515
Function iDiv100(Value:Cardinal):Cardinal;
ASM   MOV EDX, 051EB851Fh   MUL EDX   SHR EDX, 5   MOV EAX, EDXend;
Function iDiv10000(Value:Cardinal):Cardinal;
ASM   MOV EDX, 051EB851Fh   MUL EDX   SHR EDX, 5  MOV EAX, EDX  MOV EDX, 051EB851Fh   MUL EDX  SHR EDX, 5  MOV EAX, EDXend;

Code:

Function fast6x_inttostr(Value: Integer):string;
// 'Common sence' solution

// Web site: www.szutils.net
// E-mail  :  
var
  v,n1,n2,m1,m2,c: integer;
  //w: PWord;
  fNegative: Boolean;
  p: PChar;
//Home=https://youtu.be/cuBbQ6K45YY?t=74
begin
  fNegative:=Value <0;
  v:=abs(value);
  if v >= 1000000000 then c := 10 else
  if v >= 100000000  then c :=  9 else
  if v >= 10000000   then c :=  8 else
  if v >= 1000000    then c :=  7 else
  if v >= 100000     then c :=  6 else
  if v >= 10000      then c :=  5 else
  if v >= 1000       then c :=  4 else
  if v >= 100        then  c:=3 else
  if v >= 10  then  c:=2 else
  if v>0 then c:=1 else
        Begin  Result := '0';Exit;end;

  if fNegative then
  begin
     inc(c);
     SetLength(result,c);
     pchar(pointer(Result))^:= '-';
  end else
    SetLength(result,c);

  p:= pchar(pointer(Result))+c;
  dec(p);
  dec(p);

  while (v>10000) do
  begin
    n1:=integer(idiv10000(v));
    m1:=v-n1*10000;
    n2:=integer(idiv100(m1));
    m2:=m1-n2*100;
    pword(p)^:=word(kDigits2[m2]);dec(p);dec(p);
    pword(p)^:=word(kDigits2[n2]);dec(p);dec(p);
    v:=n1;
  end;

  while (v>9) do
  begin
    n1:= integer(idiv100(v));
    pword(p)^:=word(kDigits2[v-n1*100]);
    dec(p);
    dec(p);
    v:=n1;
  end;
  if v>0 then pchar(p+1)^:=char(v+48);
end;// Author: Sasa Zeman, DragneAdrian

Function fast6x_inttostr(value:Integer):pchar;
???


_______________________________________


pus acum 4 ani
   
admin
Administrator

Din: Bucharest
Inregistrat: acum 13 ani
Postari: 515
2019.februarie/05.=Sfanta Agata,  celbrate ,, este ocrotitoarea acestei manastirii
https://sourceforge.net/projects/vlaxco ... leted=true

inttostr. celbrate este acestei ... leted=true

32.9KB


_______________________________________


pus acum 4 ani
   
Pagini: 1  

Mergi la