www.digitalmars.com         C & C++   DMDScript  

D - about C's printf() and such

reply "Payam" <payamchee yahoo.com> writes:
I noticed that there is no sprintf() mentioned for writing to buffers in
phobos.html in the D alpha distribution. Is there a D equivalent (yet)?

Also, I unzipped dmdalpha.zip and moved all the files from \dmd to \dm -- on
top of the C++ distribution. PATH includes \dm\bin. dmd.exe can't find
"object.d" bla bla bla... am I missing something here? (Sorry I know this is
a dumb question... but it'd help a lot if someone could help me resolve
this)

-Payam Ahdout
Mar 11 2002
next sibling parent "Pavel Minayev" <evilone omen.ru> writes:
"Payam" <payamchee yahoo.com> wrote in message
news:a6j4ek$1kg4$1 digitaldaemon.com...

 I noticed that there is no sprintf() mentioned for writing to buffers in
 phobos.html in the D alpha distribution. Is there a D equivalent (yet)?
printf() is not a D function as well. If I understand it correct, every D compiler should supply a library of ANSI C functions, so you always get all the stuff like printf() (and sprintf()). It might not be in the headers currently, but you can always import it yourself.
 Also, I unzipped dmdalpha.zip and moved all the files from \dmd to \dm --
on
 top of the C++ distribution. PATH includes \dm\bin. dmd.exe can't find
 "object.d" bla bla bla... am I missing something here? (Sorry I know this
is
 a dumb question... but it'd help a lot if someone could help me resolve
 this)
You should tell the compiler where to find Phobos modules. If you compile the samples from the SAMPLES\D folder, the command-line should be: dmd -I../../src/phobos filename.d Or just write a .bat wrapper =)
Mar 11 2002
prev sibling parent "Walter" <walter digitalmars.com> writes:
"Payam" <payamchee yahoo.com> wrote in message
news:a6j4ek$1kg4$1 digitaldaemon.com...
 I noticed that there is no sprintf() mentioned for writing to buffers in
 phobos.html in the D alpha distribution. Is there a D equivalent (yet)?
The outbuffer package serves that purpose.
 Also, I unzipped dmdalpha.zip and moved all the files from \dmd to \dm --
on
 top of the C++ distribution. PATH includes \dm\bin. dmd.exe can't find
 "object.d" bla bla bla... am I missing something here? (Sorry I know this
is
 a dumb question... but it'd help a lot if someone could help me resolve
 this)
Use -Ipath to set the path for where to look for imports, such as: -I\dm\src\phobos
Mar 11 2002