www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - import or not import

reply Artem <Artem_member pathlink.com> writes:
it compiles without eror!
what can I use without impot else?
------------------------------
//import std.c.stdio; 

int main()
{
sum(dig,data);
printf("Hallo World\n");
return 0;

}
------------------------------
Dec 14 2004
next sibling parent Thomas Kuehne <thomas-dloop kuehne.thisisspam.cn> writes:
Artem schrieb am Tue, 14 Dec 2004 20:16:21 +0000 (UTC):
 it compiles without eror!
 what can I use without impot else?
 ------------------------------
 //import std.c.stdio; 

 int main()
 {
 sum(dig,data);
 printf("Hallo World\n");
 return 0;

 }
 ------------------------------
-> dmd/src/phobos/object.d
Dec 14 2004
prev sibling next sibling parent John Reimer <brk_6502 yahoo.com> writes:
Artem wrote:
 it compiles without eror!
 what can I use without impot else?
 ------------------------------
 //import std.c.stdio; 
 
 int main()
 {
 sum(dig,data);
 printf("Hallo World\n");
 return 0;
 
 }
 ------------------------------
 
 
Printf is of those functions that's available by default. No imports necessary. :-)
Dec 14 2004
prev sibling parent reply Tyro <ridimz_at yahoo.dot.com> writes:
Artem wrote:
 it compiles without eror!
 what can I use without impot else?
You can use any anything that is defined in or publicly imported into dmd/src/phobos/object.d without having to importing it into your program!
 ------------------------------
 //import std.c.stdio; 
 
 int main()
 {
 sum(dig,data);
 printf("Hallo World\n");
 return 0;
 
 }
 ------------------------------
 
 
Dec 14 2004
parent "Simon Buchan" <currently no.where> writes:
On Tue, 14 Dec 2004 18:05:20 -0500, Tyro <ridimz_at yahoo.dot.com> wrote:

 Artem wrote:
 it compiles without eror!
 what can I use without impot else?
You can use any anything that is defined in or publicly imported into dmd/src/phobos/object.d without having to importing it into your program!
 ------------------------------
 //import std.c.stdio;  int main()
 {
 sum(dig,data);
 printf("Hallo World\n");
 return 0;
  }
 ------------------------------
Whether or not thats a Good Thing(tm) is up to you, I suppose -- "Unhappy Microsoft customers have a funny way of becoming Linux, Salesforce.com and Oracle customers." - www.microsoft-watch.com: "The Year in Review: Microsoft Opens Up" -- "I plan on at least one critical patch every month, and I haven't been disappointed." - Adam Hansen, manager of security at Sonnenschein Nath & Rosenthal LLP (Quote from http://www.eweek.com/article2/0,1759,1736104,00.asp) -- "It's been a challenge to "reteach or retrain" Web users to pay for content, said Pizey" -Wired website: "The Incredible Shrinking Comic"
Dec 15 2004