D - File identifier error
- Andrew Edwards (19/19) Sep 11 2002 the following error:
- Patrick Down (3/23) Sep 11 2002 Don't have variable names the same as imports.
- Pavel Minayev (2/8) Sep 11 2002 class File is defined in stream.d, not in file.d
- Andrew Edwards (15/15) Sep 12 2002 Thanks Pavel, I imported the wrong file. String vs Stream. BTW the prob...
the following error: test.d(5): identifier 'File' is not defined was generated when I trued to compile the following code: import string; import file; int main (char[][] args) { File file = new File; file.create('test.dat'); int a = 0, b = 1; for (int i = 0; i < 1000; i++) { int c = a + b; file.write(c); a = b; b = c; } return 0; } how would I go about addressing this problem?
Sep 11 2002
"Andrew Edwards" <crxace13 comcast.net> wrote in news:aloj8o$1qjj$1 digitaldaemon.com:the following error: test.d(5): identifier 'File' is not defined was generated when I trued to compile the following code: import string; import file; int main (char[][] args) { File file = new File; file.create('test.dat'); int a = 0, b = 1; for (int i = 0; i < 1000; i++) { int c = a + b; file.write(c); a = b; b = c; } return 0; }Don't have variable names the same as imports.
Sep 11 2002
Andrew Edwards wrote:the following error: test.d(5): identifier 'File' is not defined was generated when I trued to compile the following code: import string; import file;class File is defined in stream.d, not in file.d
Sep 11 2002
Thanks Pavel, I imported the wrong file. String vs Stream. BTW the problem with the unittest in stream.d is that the string "Testing stream.d:" contains 17 characters, not 18. "Pavel Minayev" <evilone omen.ru> wrote in message news:alp2aq$29um$1 digitaldaemon.com... | Andrew Edwards wrote: | > the following error: | > test.d(5): identifier 'File' is not defined | > was generated when I trued to compile the following code: | > | > import string; | > import file; | | class File is defined in stream.d, not in file.d |
Sep 12 2002