Board index » delphi » Help coverting code to TPW 1.5

Help coverting code to TPW 1.5

Program ShowFiles(INput,output);
Uses wincrt,winDos;

Procedure ShowAllFilesIn(StartDir:String);
------> Var DirInfo:SearchRec; <-------
Begin
     FindFirst(StartDir + '*.*', AnyFile, DirInfo);

        While DosError = 0 Do
        Begin
        If DirInfo.Attr = Directory Then
        Begin
                      If Pos('.', DirInfo.Name) <> 1 Then  { Skip '.' and '..'
directories }
                        ShowAllFilesIn(StartDir + DirInfo.Name + '\');
                End
                Else
                        WriteLn(StartDir + DirInfo.Name);

                FindNext(DirInfo);
        End;
  End;
Begin
        ShowAllFilesIn('C:\');
End.

I edited the code but I got an error. It has the arrows around it. I am using
TPW 1.5, Hope you can figure it out cause this stuff is a little above my head.
It says "error 3:unknown identfier" Thank in advance.

JW#56
======================================================
DoNe By ThE pEoPlE aT hApPy SoFtWaRe :-)      Brvhart...@aol.com    
http:\\members.aol.com\brvhart662\index.html <-The Pascal Web Page            

 

Re:Help coverting code to TPW 1.5


Brvhart662 <brvhart...@aol.com> wrote in article
<19980107010901.UAA08...@ladder02.news.aol.com>...

Quote
> Program ShowFiles(INput,output);
> Uses wincrt,winDos;

> Procedure ShowAllFilesIn(StartDir:String);
> ------> Var DirInfo:SearchRec; <-------

        Change SearchRec to TSearchRec

Quote

> I edited the code but I got an error. It has the arrows around it. I am
using
> TPW 1.5, Hope you can figure it out cause this stuff is a little above my
head.
> It says "error 3:unknown identfier" Thank in advance.

--
Hilton Evans
***********************************************************
The two most important things in life are personal
health and time ... H.Evans 1995
**********************************************************
Chempen+ Chemical Structure Drawing
Software for Windows
http://www.ici.net/cust_pages/hfevans/chempen.htm

Re:Help coverting code to TPW 1.5


Quote
brvhart...@aol.com (Brvhart662) wrote:
>Program ShowFiles(INput,output);
>Uses wincrt,winDos;

>Procedure ShowAllFilesIn(StartDir:String);
>------> Var DirInfo:SearchRec; <-------

DOS unit defines SearchRec, WinDOS defines tSearchRec.  You'll
most likely encounter this problem again with other identifiers.
When you do, try prefixing the letter "t" to the unknown
identifier.  A "t" is used by windows and TVision to denote a type
identifier.

    ...red

--
Support the anti-Spam amendment
  Join at http://www.cauce.org/

Other Threads