I'm currently checking two files against each other using a nested WHILE.
If I hit the first error condition using the while, I have to do a sepearte IF looking for FEOF. is their an easier way, or should I just check twice?
Basicly my psudocode looks like this:
While not FEOF 0
szline=""
while check(&szline) ;Check for szline being NULL (Empty string)
fgets 0 szline ; get a record
if FEOF 0
fputs 1 "out of records in out.txt"
exitwhile
endif
endwhile
if FEOF 0
exitwhile ; This is what I'm wondering if is Nessacary??
; Is there a more elegant way?
While not FEOF 2
while check(&szrecord) ;Check for szline being NULL (Empty string)
fgets 2 szrecord ; get a record
if FEOF 2
fputs 1 "out of records in new.txt"
exitwhile
endif
endwhile
Do more stuff here
endwhile
If I hit the first error condition using the while, I have to do a sepearte IF looking for FEOF. is their an easier way, or should I just check twice?
Basicly my psudocode looks like this:
While not FEOF 0
szline=""
while check(&szline) ;Check for szline being NULL (Empty string)
fgets 0 szline ; get a record
if FEOF 0
fputs 1 "out of records in out.txt"
exitwhile
endif
endwhile
if FEOF 0
exitwhile ; This is what I'm wondering if is Nessacary??
; Is there a more elegant way?
While not FEOF 2
while check(&szrecord) ;Check for szline being NULL (Empty string)
fgets 2 szrecord ; get a record
if FEOF 2
fputs 1 "out of records in new.txt"
exitwhile
endif
endwhile
Do more stuff here
endwhile