| | |
Turn [Space] into [tab] in text files
![]() |
•
•
Join Date: Oct 2006
Posts: 3
Reputation:
Solved Threads: 0
Hi guys,
I am currently working on a program that opens a text file and replaces all [Space]s with [Tab]s.
I already know how to read teh text file and write in the new variables, but I just can't figure out how to make a pascal program a) read a [Space] and b) write a [Tab]!
Can anyone help me, please???
Thanks a lot in advance
WhiteAvenger
I am currently working on a program that opens a text file and replaces all [Space]s with [Tab]s.
I already know how to read teh text file and write in the new variables, but I just can't figure out how to make a pascal program a) read a [Space] and b) write a [Tab]!
Can anyone help me, please???
Thanks a lot in advance
WhiteAvenger
I don't reall know pascal, but most languages are pretty much the same. You can do it one of two ways:
1. read the file one character at a time and write the character just read to another file. When a space is read replace it with a tab and write the tab instead.
2. Read the entire line, then search the line for spaces. When a space is found replace it with a tab. Finally wrote the line to another file.
If you still have problems, please post the code you have so we can see what it is doing;
1. read the file one character at a time and write the character just read to another file. When a space is read replace it with a tab and write the tab instead.
2. Read the entire line, then search the line for spaces. When a space is found replace it with a tab. Finally wrote the line to another file.
If you still have problems, please post the code you have so we can see what it is doing;
The most important thing in the Olympic Games is not to win but to take part, just as the most important thing in life is not the triumph but the struggle. The essential thing is not to have conquered but to have fought well.
-Pierre de Coubertin, The Olympic Creed Inspired by Bishop Ethelbert
-Pierre de Coubertin, The Olympic Creed Inspired by Bishop Ethelbert
![]() |
Similar Threads
- Need reference to Random Accessing of Text files (C++)
- Write and Read text files (Java)
- Making arrays from text files (VB.NET)
- To open and close in turn all the files in a directory (C++)
- appending two java text files (Java)
- lost my notebook for making text files--how do I get it back? (Windows NT / 2000 / XP)
Other Threads in the Pascal and Delphi Forum
- Previous Thread: How to force program to write itself?
- Next Thread: How to automatic update files from the web
Views: 4014 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for Pascal and Delphi
animation api app array button compile console data database dbisam delete delphi documentcomplete2 edit environment error errors events file form function gdi gis lasrautoinc media navigatecomplete2 network object open opengl pascal passing path player procedure search set sql table twebbrowser username variable win7 windows






