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:
Ela 22 Cluj la Simpatie.ro
Femeie
22 ani
Cluj
cauta Barbat
22 - 48 ani
lisp2arx / Delphi , InnoPascal / Delphi32 - Fast strPas If you have length of string  
Autor
Mesaj Pagini: 1
admin
Administrator

Din: Bucharest
Inregistrat: acum 13 ani
Postari: 508
Length-of (MyAnsiString) is 10.55Mb sizeof. Already I have strlen, and I do not need execute (strlen....)
How I can transform source to String, more Better?.

Type pdouble=^double;

Code:

Function strpasd(locExtMax:pchar;extmax:Integer):string;
Var dxf,nth,gap:integer; kGripEnd,kGripStart:pchar;
    bCanExit:char;
Begin
   result:='';if (locExtMax=nil) or (locExtMax^=#0) then exit;
   if (extmax<1) then Begin result:=strpas(locExtMax);exit;End;
   setlength(result,extmax);
   kGripEnd:=@result[extmax];
   nth:=0;
   kGripStart:=@result[1];
   gap:=extmax shr 3;
   for dxf:=1 to gap do
         Begin  pdouble(kGripStart)^:=pdouble(@locExtMax[nth])^;
                inc(nth,sizeof(double));
                inc(kGripStart,sizeof(double));
       End;
   while (kGripStart<=kGripEnd) do
        Begin bCanExit:=locExtMax[nth];
              if (bCanExit=#0) then exit else kGripStart^:=bCanExit;
              inc(nth);
              inc(kGripStart);
         End;
End;//off-strpasd("strpas cu verificare #0")



_______________________________________


pus acum 3 ani
   
Pagini: 1  

Mergi la