Edit .txt
Posted: Fri Feb 06, 2004 9:34 am
I would like to edit a .txt file using Qbasic,
The .txt file was created via another program as a .db file and then opened via wordpad and saved as .txt file
I have replaced the header in the text via
post$= chr$(0)
OPEN "C:\"+filename+".txt" for Binary as #6
for count = 1 to 2057
Put #6,count,post$
Close #6
(1) I would like to count the number of Chr$(41) within the rest of the file.
(2) Replace Chr$(41) with Chr$(13) within the rest of the file.
I cannot use command "GET$ LINE INPUT" as there is no return chr$ within the text and all is loaded
"INPUT,num,varib" not suitable for application
The .txt file was created via another program as a .db file and then opened via wordpad and saved as .txt file
I have replaced the header in the text via
post$= chr$(0)
OPEN "C:\"+filename+".txt" for Binary as #6
for count = 1 to 2057
Put #6,count,post$
Close #6
(1) I would like to count the number of Chr$(41) within the rest of the file.
(2) Replace Chr$(41) with Chr$(13) within the rest of the file.
I cannot use command "GET$ LINE INPUT" as there is no return chr$ within the text and all is loaded
"INPUT,num,varib" not suitable for application