English
Source / code snippets

File Text comparison

 
- Page 1 -


Text File comparison procedure - Have I sometime time used ^^
procedure position only solid whether The Textfiles exakt same are. it go no differences gefiltert.

 {$iq}//xpse
cls
print "is exact same?: "+if(fle_compareexact ("org.txt","second.txt"),"Jo","Nö")
waitkey
end

proc fle_compareexact

    parameters fle1$,fle2$
    declare ex%,s$,ss$
    assign #1,fle1$
    assign #2,fle2$
    reset #1
    reset #2
    ex%=0

    whilenot ex%

        input #1,s$
        input #2,ss$

        if (trim$(s$)<>trim$(ss$))

            ex%:=2

        elseif ( eof(#1) & eof(#2) )

            ex%:=1

        elseif eof(#1)

            ex%:=2

        elseif eof(#2)

            ex%:=2

        endif

        case ( eof(#1) & eof(#2) ) : casenot ex% : ex%:=1

    wend

    close #1
    close #2
    return if(equ(ex%,1),1,0)

endproc

 
11/29/04  
 



 
- Page 1 -


my Proc having a small logischen Error - with Dateiende wars alike whether The last both Lines übereinstimmten if both Files same-many Lines had.

Habs fixed.

@Frank: your Proc is less suitable TextFiles To vergleichen. Text files must not The same Size having circa same To his - too must tappt im dunkeln never byteexact-same his. How the name already says - the same Text must drinnstehen - even if on the right place.

naturally is ne while { input combination always ne SpeedKrücke - and naturally ließe the operation too as Speicheroperation manage. Bisl mempos on #10 etc.

salvo, iF
 
11/30/04  
 




Frank
Abbing
iF, space etc. belong likewise to that Text and its Formatierung. alike whether Textdatei or other, Übereinstimmung is by me exakte Übereinstimmung. but Please.
Rolf, What is there go. you are the Programmierens still More as capable. find You the trouble not? I can nothing discover...
 
11/30/04  
 




Rolf
Koch
Well, i'm To More capable, the likes his. however work I in retail and it short to christmas ...... must I there yet plenty say.
I Have z.Zt. by the Stress even Problems a fünfzeiler To write, without that I me dauernd verhaue
no, but it's located really nothing ungewöhnliches to.
both Text files whether equal to or abgeändert report whom Error.
both Text files are straight freshly prepares been.
both Text files are for read/Schreibzugriff fine suitable.
unfortunately How already from supra named Found and because of Noc Update (so I finally again with empty Roc weg can - soon comes Yes P9 and there should Roc too correct his) come I do not moreover your Sourcecode detailgenau durchzugehen. but I wealth, that your code still correctly arranged is, or?

Rolf
 
11/30/04  
 



Frank I know the space to that Text belong. I Have still too never what other behauptet - you are soo miserable. I wrote Text files must not The same Size and have neither byte-exact.

the can to that Bleistift hot the a Textdatei too then whom equal Textinhalt has if these z.B. with others Steuerzeichen stored is.

z.B. only #10 instead of #13#10

but what erzähl I you - sure nothing New.

the Trim what supra standing is objectively less correctly.. hang of it ex for what one The Proc benefit would like - möge eachone self decide. there geb I you right - but meant You, the?

salvo, iF
 
11/30/04  
 




Frank
Abbing
@iF: clear, habs Yes understood . should the User still decide, what the right for it is, ne?

@Rolf: Schick me the two Files still simply time. naturally only, if You want...
shining so, as would FileSize not correctly. works...

P.s. is christmas not the solid the silence and relaxation? :biggrin:
 
11/30/04  
 



[quote:db58989a3e=Frank Abbing]@iF: clear, habs Yes understood . should the User still decide, what the right for it is, ne? [/quote:db58989a3e]Nain grrrr the Programmer.

[quote:db58989a3e]@Rolf: Schick me the two Files still simply time. naturally only, if You want...
shining so, as would FileSize not correctly. works...

P.s. is christmas not the solid the silence and relaxation? :biggrin:[/quote:db58989a3e]I know not the we here what other do.

salvo, iF

 
11/30/04  
 




Jörg
Sellmeyer
Hi,
so How I that see, get the program quite no chance mismatched Files testing there
If ((gx&>0) and (gx1&=gx2&))
mismatched Files already ausschließt and same to Error Message verzweigt.
with Or ought to it functions.
Greeting
Jörg
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
12/01/04  
 



 
- Page 2 -



Frank
Abbing
Hi,

is correct...
Have another Line in whom Source eingefügt. now ought to it correctly. functions. thanks!
 
12/01/04  
 




Jörg
Sellmeyer
Hall Frank,
ought to the:
Case (gx1&=gx2&): Return differently big and so mismatched
not so
Case (gx1& <> gx2&): Return differently big and so mismatched
lauten?
Greeting
Jörg
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
12/01/04  
 




Frank
Abbing
Hi Jörg,

oh, sure!
Mist, the comes of it, if one not extensively testing and the children circa a around whirr and Roger Rabbit play want and and and, very...

Thank you!

P.s. The last Posting I will in Kürze delete. is Yes no Diskussionsthread, separate it should Source code posted go. means nothing thereby think, ok?
 
12/01/04  
 



If it no Discussion is from the in the Nachhinein brauchbare Information pulled go can it can here with Source removes go. there be I utterly your opinion Frank.

If however in the Diskusion z.B. possible entrapments or After/advantages of/ one procedure discussed are - should one weigh. its namely already so virtual the each pictured Proc too its own Diskusionsstrang has.

salvo, iF
 
12/01/04  
 




Frank
Abbing
Hi,

i'll only The meanwhile korregierten Bugreports delete. after a conscience Time, after any beteiligten User opportunity had, tappt im dunkeln To reading.
 
12/01/04  
 




Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

16.514 Views

Untitledvor 0 min.
PETER195603/23/16
Hans Hermann03/18/13

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie