Passing file handles from functions? (Changed since dmd v0.118)

BCS ao at pathlink.com
Wed Sep 17 17:49:40 PDT 2008


Reply to Sergey,

> AEon <aeon2001 at lycos.de> wrote:
> 
>> BCS wrote:
>> 
>>> Reply to AEon,
>>> 
>>>> Last coding D 3.5 years ago. I wrote functions that would return
>>>> the file handle. But such code no longer compiles under v1.030 (it
>>>> worked under v0.118 though). Could someone please tell me how this
>>>> may be fixed.
>>>> 
>>> Can I assume that you are importing std.stream ?
>>> 
>> Yes you can... because "File" works everywhere else.
>> 
>> If that should make a difference, I am importing another module that
>> itself imports:
>> 
>> import std.c.stdio;
>> import std.c.stdlib;
>> import std.stdio;
>> import std.path;
>> import std.file;
>> import std.string;
>> import std.conv;
>> import std.date;
>> import std.stream;
> From reading other people's code and Phobos sources I came to
> conclusion that, long ago, imports were public by default.  They are
> not anymore.  Imports are private by default, this may be your
> problem.
> 

That is true. The change was not to far from v1.000




More information about the Digitalmars-d-learn mailing list