s88 0 Newbie Poster

So I need to do a program, that goes throgh an html file and prints all the tags, but not closing tags. I tried the following code but when I run it several arrows appear. Can someone help please?

Program one;
 
Uses crt;
 
Var
   f : text;
 
Procedure pnt(var f : text);
 
Var
   temp : char;
 
Begin
     repeat
           readln(f,temp);
           If (temp = '<') then
                       repeat
                           readln(f,temp);
                           write(temp);
                       until ((temp = ' ') or (temp = '/'))
           Else writeln(temp);
     until eof(f);
End;
 
Begin
     clrscr;
 
     Assign(f,'e:\SITE2.txt');
 
     Reset(f);
 
     pnt(f);
 
     Close(f);
 
     readln;
End.
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.