www.digitalmars.com         C & C++   DMDScript  

D - conflicts in most samples: stdio.printf vs object.printf

reply Ruslanas Abdrachimovas <anubis 03bar.ktu.lt> writes:
Hello,
in most D (alpha 16) sample programms stdio.printf() conflicts with 
object.printf() that's very anoying... When will be the fix available? I 
think that the problem is default importing of "object.d".

Ruslanas
Jan 29 2002
parent reply "Walter" <walter digitalmars.com> writes:
Just comment out one of the printf's.

"Ruslanas Abdrachimovas" <anubis 03bar.ktu.lt> wrote in message
news:3C56AEA7.5070106 03bar.ktu.lt...
 Hello,
 in most D (alpha 16) sample programms stdio.printf() conflicts with
 object.printf() that's very anoying... When will be the fix available? I
 think that the problem is default importing of "object.d".

 Ruslanas
Jan 29 2002
next sibling parent reply Ruslanas Abdrachimovas <anubis 03bar.ktu.lt> writes:
Walter wrote:

 Just comment out one of the printf's.
 
 "Ruslanas Abdrachimovas" <anubis 03bar.ktu.lt> wrote in message
 news:3C56AEA7.5070106 03bar.ktu.lt...
 
Hello,
in most D (alpha 16) sample programms stdio.printf() conflicts with
object.printf() that's very anoying... When will be the fix available? I
think that the problem is default importing of "object.d".

Ruslanas
Actually, that's OK. But if i need to import "stdio.d" it's printf() conflicts with automatically imported "object.d" printf(). That's was the major problem. Ruslanas
Jan 30 2002
parent "Walter" <walter digitalmars.com> writes:
Yes, but commenting one of them out will fix the problem. Or you can
download it again, a fixed version has been posted. -Walter

"Ruslanas Abdrachimovas" <anubis 03bar.ktu.lt> wrote in message
news:3C57B30C.4010402 03bar.ktu.lt...
 Walter wrote:

 Just comment out one of the printf's.

 "Ruslanas Abdrachimovas" <anubis 03bar.ktu.lt> wrote in message
 news:3C56AEA7.5070106 03bar.ktu.lt...

Hello,
in most D (alpha 16) sample programms stdio.printf() conflicts with
object.printf() that's very anoying... When will be the fix available? I
think that the problem is default importing of "object.d".

Ruslanas
Actually, that's OK. But if i need to import "stdio.d" it's printf() conflicts with automatically imported "object.d" printf(). That's was the major problem. Ruslanas
Jan 30 2002
prev sibling parent Ruslanas Abdrachimovas <anubis 03bar.ktu.lt> writes:
I suggest, such fix for future releases of [src/phobos/object.d] file :
remove line: extern (C) static int printf(char *, ...);
add    line: import c.stdio;

Because it vould solve conflicts and phobos lib logic doesn't change.

Ruslanas

Walter wrote:

 Just comment out one of the printf's.
 
 "Ruslanas Abdrachimovas" <anubis 03bar.ktu.lt> wrote in message
 news:3C56AEA7.5070106 03bar.ktu.lt...
 
Hello,
in most D (alpha 16) sample programms stdio.printf() conflicts with
object.printf() that's very anoying... When will be the fix available? I
think that the problem is default importing of "object.d".

Ruslanas
Jan 30 2002