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:
karina22
Femeie
25 ani
Bucuresti
cauta Barbat
25 - 54 ani
lisp2arx / Delphi , InnoPascal / Delphi32- StrPas and Search Char/s inside  
Autor
Mesaj Pagini: 1
admin
Administrator

Din: Bucharest
Inregistrat: acum 13 ani
Postari: 516
Since  strPas is too slow,

Code:

Function str_pas1(const sourcesir:pchar):string;
Begin  result:='';
       if (sourcesir=nil) or (sourcesir^=#00) then exit;
       result:=sourcesir;
End;
Function str_pas2(arrayeditstate:pchar;limcheck:integer):string;
Begin
    result:='';
    if (arrayeditstate=nil) or (arrayeditstate^=#0) then exit;
    if (limcheck<1) then limcheck:=strlen(arrayeditstate);
    SetString(result,arrayeditstate,limcheck);
End;

You can add more effects inside StrPas (uppercase, search two chars inside)

Code:

Function strpas255for(var dest:shortstring;srchui:pchar;SNTSearch:word):integer;
Var dxf,nth:integer;
    cll,chh:word;
    zerop:boolean;
label bCanExit;
Begin
     result:=RTCAN;
     zerop:=false;
     nth:=1;
     if (srchui=NIL) then goto bCanExit;
     result:=RTREJ;
     setlength(dest,255);
     if (SNTSearch=0)then
       Begin for nth:=1 to 255 do
               Begin  dxf:=ord(srchui^);
                      if (dxf=0) then  goto bCanExit;
                      dest[nth]:=upcase(char(dxf));
                      if (result<0) and (dxf>1) then result:=RTNORM;
                      inc(srchui);
                   End;
               goto bCanExit;    
        End;
       result:=0;
       cll:=SNTSearch and 255;
       chh:=(SNTSearch shr 8) and 255;
       if (cll>0)and(chh>0) then
       Begin for nth:=1 to 255 do
               Begin  dxf:=ord(srchui^);
                      if (dxf=0) then goto bCanExit else
                      if (cll=dxf) then result:=result and cll  else
                      if (chh=dxf) then result:=(dxf shl 8)+(result and 255);
                      dest[nth]:=upcase(char(dxf));
                      inc(srchui);
                   End;
              goto bCanExit;    
        End;

       if (chh>0) then
       Begin for nth:=1 to 255 do
               Begin  dxf:=ord(srchui^);
                      if (dxf=0) then goto bCanExit else
                      if (chh=dxf)and(result<0) then result:=nth;
                      dest[nth]:=upcase(char(dxf));
                      inc(srchui);
                   End;
              goto bCanExit;
        End;

       if (cll>0) then
       Begin for nth:=1 to 255 do
               Begin  dxf:=ord(srchui^);
                      if (dxf=0) then goto bCanExit else
                      if (cll=dxf)and(result<0) then result:=nth;
                      dest[nth]:=upcase(char(dxf));
                      inc(srchui);
                   End;
             goto bCanExit;
       End;
bCanExit:
    setlength(dest,nth-1);
End;//off-strpasfor("")



delphi32- strpas and search char/s inside strpas too then exit;
 then exit;
 then can add more

70KB


_______________________________________


pus acum 2 ani
   
Pagini: 1  

Mergi la