09-14-2008, 01:31 PM
'lrcvs 14.09.08
'this program eliminates repeated elements of the original file called: "a"
'........ and enter the correct elements in the file destination called "b"
'este programa elimina los elementos repetidos del fichero origen llamado: "a"
'........ y escribe los elementos correctos en el fichero destino llamado: "b"
cls
open "i", #1, "a.txt"
10 :
if eof(1) then goto 20
input #1, a$
open "i", #2, "b.txt"
15 :
if eof(2) then goto 30
input #2, b$
'here we comparisons
'aqui hacemos las comparaciones
if a$ = b$ then close (2): goto 10
goto 15
print a$
goto 10
20 :
close (1)
end
30 :
'here we write the unique elements
'aqui escribimos los elementos unicos
close (2)
open "a", #2, "b.txt"
print #2, a$
close (2)
goto 10
'this program eliminates repeated elements of the original file called: "a"
'........ and enter the correct elements in the file destination called "b"
'este programa elimina los elementos repetidos del fichero origen llamado: "a"
'........ y escribe los elementos correctos en el fichero destino llamado: "b"
cls
open "i", #1, "a.txt"
10 :
if eof(1) then goto 20
input #1, a$
open "i", #2, "b.txt"
15 :
if eof(2) then goto 30
input #2, b$
'here we comparisons
'aqui hacemos las comparaciones
if a$ = b$ then close (2): goto 10
goto 15
print a$
goto 10
20 :
close (1)
end
30 :
'here we write the unique elements
'aqui escribimos los elementos unicos
close (2)
open "a", #2, "b.txt"
print #2, a$
close (2)
goto 10