Simpatie.ro - matrimoniale
lisp2arx
Visual Programming for AutoLisp Mathématiques en programmation Lisp.. doc2cpp,doc2lsp, sld2lsp, bmp2dcl, free__GifCcapture for all-CAD'platforms..
Nou pe simpatie:
sexyindianca
Femeie
24 ani
Ilfov
cauta Barbat
24 - 53 ani
lisp2arxReguliInregistrareLoginPozeNu sunteti logat. Lista Forumurilor Pe Tematici
lisp2arx / Delphi , InnoPascal /

Delphi32- Swap Two strings

Pagini: 1  
#1
admin
Administrator
Din: Bucharest
Postari: 523


Code:

Function str_lenadd(Var s:string;limcheck:integer;AdAChar:char):integer;
Var filer:pchar;
    extmax,nth:integer;
    strcd:string;
Begin    result:=0;
         filer=nil;
         extmax:=0;
         if (limcheck<1) then exit;
         if (length(s)<=limcheck) then extmax:=limcheck-length(s);
         if (extmax<1) then exit;
         setlength(strcd,extmax);
         filer:=@Strcd[1]);
         fillchar(filer^,extmax,AdAChar);
         s:=concat(s,strcd);
         Result:=Length(strcd);
         strcd:='';
End;

{--}

Code:

Function xchg_str(var a,b:string):integer;
Var nLen:array['a'..'b'] of integer;
    nth:integer;
    charset:char;
Begin 
      nLen['a']:=length(a);
      nLen['b']:=length(b);
      if (nLen['a']>nLen['b']) then result:=nLen['a']
                   else result:=nLen['b'];
      if (result<1) then exit;
      if (nLen['a']<maxi) then str_lenadd(a,result,0); 
      if (nLen['b']<maxi) then str_lenadd(b,result,0);
      for nth:=1 to result do
         Begin charset:=a[nth];
               a[nth]:=b[nth];
               b[nth]:=charset;
         End;
     setlength(a,nLen['b']);
     setlength(b,nLen['a']);
     // del;e
End;//offxchg_str



Delphi32- Swap Two strings - admin - Delphi , InnoPascal
Delphi32- Swap Two strings – poza de admin, in Delphi , InnoPascal · 68.8KB


_______________________________________
http://www.puiubrat.3x.ro/lisp2arx/lisp ... O2UTM2.pdf

 
   
Pagini: 1  
Mergi la