<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'About #8 (backspace)' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'About #8 (backspace)' posted on the 'Pascal' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Tue, 18 Jun 2013 17:09:16 -0700</pubDate>
    <lastBuildDate>Tue, 18 Jun 2013 17:09:16 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>About #8 (backspace)</title>
      <link>http://www.programmersheaven.com/mb/pasprog/330415/330415/about-8-backspace/</link>
      <description>I have a word in a text file that I want to erase. It appears that the function Seek doesn't work for text files. So, I found that #8 is the ASCII code for backspace. The problem is that when I use Write(file, #8) or Write(file, #8, ' ', #8) Notepad shows a strange icon in the file, and the word remains in the file.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/330415/330415/about-8-backspace/</guid>
      <pubDate>Sun, 26 Feb 2006 14:27:27 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: About #8 (backspace)</title>
      <link>http://www.programmersheaven.com/mb/pasprog/330415/330416/re-about-8-backspace/#330416</link>
      <description>: I have a word in a text file that I want to erase. It appears that the function Seek doesn't work for text files. So, I found that #8 is the ASCII code for backspace. The problem is that when I use Write(file, #8) or Write(file, #8, ' ', #8) Notepad shows a strange icon in the file, and the word remains in the file.&lt;br /&gt;
: &lt;br /&gt;
The #8 character is seen as a normal character when placed in a file. To delete a word from a text file, you need to copy the file without the word in question into a new file. Here is an example, which removes all words "the":&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
var
  sf, df: textfile;
  s: string;
begin
  Assign(sf, 'source.txt');
  Reset(sf);
  Assign(df, 'dest.txt');
  Rewrite(df);
  while not eof(sf) do
  begin  
    readln(sf, s); { read a line } 
    while Pos('the', s) &amp;gt; 0 do { remove all "the"s from the line }
      Delete(s, Pos('the', s), 3);
    writeln(df, s); { write it to the new file }
  end;
  Close(df);   
  Close(sf);
end;
&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/330415/330416/re-about-8-backspace/#330416</guid>
      <pubDate>Sun, 26 Feb 2006 14:32:05 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: About #8 (backspace)</title>
      <link>http://www.programmersheaven.com/mb/pasprog/330415/330418/re-about-8-backspace/#330418</link>
      <description>: : I have a word in a text file that I want to erase. It appears that the function Seek doesn't work for text files. So, I found that #8 is the ASCII code for backspace. The problem is that when I use Write(file, #8) or Write(file, #8, ' ', #8) Notepad shows a strange icon in the file, and the word remains in the file.&lt;br /&gt;
: : &lt;br /&gt;
: The #8 character is seen as a normal character when placed in a file. To delete a word from a text file, you need to copy the file without the word in question into a new file. Here is an example, which removes all words "the":&lt;br /&gt;
: &lt;pre class="sourcecode"&gt;
: var
:   sf, df: textfile;
:   s: string;
: begin
:   Assign(sf, 'source.txt');
:   Reset(sf);
:   Assign(df, 'dest.txt');
:   Rewrite(df);
:   while not eof(sf) do
:   begin  
:     readln(sf, s); { read a line } 
:     while Pos('the', s) &amp;gt; 0 do { remove all "the"s from the line }
:       Delete(s, Pos('the', s), 3);
:     writeln(df, s); { write it to the new file }
:   end;
:   Close(df);   
:   Close(sf);
: end;
: &lt;/pre&gt;&lt;br /&gt;
: &lt;br /&gt;
Thanks for the help&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/330415/330418/re-about-8-backspace/#330418</guid>
      <pubDate>Sun, 26 Feb 2006 14:53:00 -0700</pubDate>
      <category>Pascal</category>
    </item>
  </channel>
</rss>