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


11 Years
Discussion Span
Last Post by 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;


Ha, ha, very funny...
I ask how the program recognises a [space] and you tell me to read it - I ask how the program regocnizes a [Tab] and you tell me to write it.

Anyway, the Problem is [resolved] as I have just used VB instead.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.