Not happy with std.recls

jicman jicman_member at pathlink.com
Fri Mar 17 10:00:39 PST 2006


Greetings!  So, I have

12:17:18.96>dmd
Digital Mars D Compiler v0.149
Copyright (c) 1999-2006 by Digital Mars written by Walter Bright

and I have this very complicated program, copied from the std.recls
documentation:

|private import std.stdio;
|private import std.recls;
|
|int main(char[][] args)
|{
|  FileSearch s = new FileSearch("c:\\temp", "*.*", RECLS_FLAG.FILES);
|
|  foreach (Entry e; s)
|  {
|    writefln(e.path());
|    writefln(e.creationTime());
|  }
|  return(0);
|}

when I compile it, I get...

12:17:36.60>dmd test.d
test.d(6): identifier 'FileSearch' is not defined
test.d(6): FileSearch is used as a type
test.d(6): variable test.main.s voids have no value
test.d(6): identifier 'FileSearch' is not defined
test.d(6): FileSearch is used as a type
test.d(6): no property 'FILES' for type 'int'
test.d(6): new can only create structs, dynamic arrays or class objects, not
void's
test.d(6): cannot implicitly convert expression (new
FileSearch("c:\\temp","*.*",1)) of type void* to int
test.d(8): foreach: int is not an aggregate type

what is wrong with this program?  I am following the Documentation.

Anyone?

jic





More information about the Digitalmars-d-learn mailing list