Last update March 7, 2012

Doc Comments /
Phobos

(redirection from Phobos)


Availability D1.x D2.x

Phobos is the standard runtime library for the D Programming Language. Some parts of Phobos may not be documented. You can add proposed documentation here. Add longer sections as a subpage, such as /Phobos/StdCtype (which are automatically added to the list at the end of the page).

Table of contents of this page
Suggested Extensions   
Proposed Enhancements   
readf/unformat   
write/writeln   
read/fread   
linux/Unix   
Operating Systems Modules   
std.c.windows   
std.c.windows.registry   
carbon ("std.c.macintosh")   
std.random   
Messages   
Printable Documentation   
Minimum Runtime Library   
Runtime Support for In-Kernel Garbage Collection   
Related   
Modules (Subpages)   

Suggested Extensions    

As suggested on news.digitalmars.com to avoid duplicated efforts and to have better coordination we can use this section to announce who is doing what. This page should be view as an incubator and the projects should be removed once included in Phobos. Also, if you think your project doesn't belong to Phobos then it also doesn't belong to here

Proposed Enhancements    

readf/unformat    

I changed this package to break it into std.stdio.readf and std.string.unformat...

Nice! Is this version available online?

Not yet, have to clean it up and backport it back into the DMD release again...

(currently it's done to a tweaked GDC, you see) And it *really* wants TypeInfo??

Main reason was to get opinions on:

  1. changed getc delegate definitions
  2. throwing on exceptions on errors
Also, I still need to write the multibyte wrappers of getc/ungetc for file based streams (regular, as well as the wide orientation kind)

NG:digitalmars.D/19895

However, the module definition and function signatures are done:

module std.unformat;

void unFormat(dchar delegate() getc, dchar delegate(dchar) ungetc,
              TypeInfo[] arguments, va_list argptr);


module std.stdio;

private void readx(FILE* fp, TypeInfo[] arguments, va_list argptr);

void readf( ... );

void freadf(FILE* fp, ...);


module std.string;

void unformat(char[] s, ...);

write/writeln    

These are the same as writef/writefln, but without special '%' strings. (i.e. percent is treated like a character, and not a format specifier)

module std.stdio;

void write(...);
void writeln(...);

void fwrite(FILE* fp, ...);
void fwriteln(FILE* fp, ...);

Usage:

writef("%s", string);

write(string);

It's extra handy if you are used to System.out.println from Java, and find those "%s" format specifiers to be scary late at night.

read/fread    

This is the same as write/fwrite, but for readf instead of writef. (just for consistency, since readf handles both "methods" natively)

linux/Unix    

The portable version of version(linux) is called: version(Unix) And the std.c.linux.linux import module is found in std.c.unix.unix ("linux" is only one of half-a-dozen possibilities for the Posix APIs)

Currently, "Unix" works in GDC - but regular DMD only knows of "linux". This can be worked around with a block like:

 version(linux) { version = Unix; }

Operating Systems Modules    

Wouldn't it make sense to have common OS routines bundled in a std.posix library? Only those routines that differ among OS's would be in std.windows, std.solaris, etc. then.

std.c.windows    

See std.c.windows

std.c.windows.registry    

See std.c.windows.registry

carbon ("std.c.macintosh")    

See DsourceProject:carbonheaders

std.random    

At http://www.digitalmars.com/d/1.0/phobos/std_random.html - should specify the range of rand(). Of course, the function is on it's way out, but still....

Messages    

Add your messages here...

Printable Documentation    

Can someone please include a reference to "print.css" in the phobos docs (D1.0 as well) to get rid of the margins, as the language reference does?

Minimum Runtime Library    

I have an operating system kernel coming along, and I wonder what the minimum RTL required by D is. Could somebody point me to a description of a bare-bones Phobos library suitable for running on bare metal? If it looks nice, I might learn D to convert my kernel from Object Pascal. -- EliGottlieb? November 30, 2006, 10:37 EST

Runtime Support for In-Kernel Garbage Collection    

I want to write an operating system with in-kernel garbage collection an error catching. What runtime support would be needed to do it in D? Which parts of phobos would need porting? -- JonasZaddach?, May 05, 2005

Atleast internal/gc and internal/deh2. A look at http://dkernel.kuehne.cn/dkernel-current.zip might help. -- ThomasKuehne?

Related    

Modules (Subpages)    

69 pages:date of last change
DocComments/Phobos/StdProcessJune 13, 2013 8:11
DocComments/Phobos/StdStdioOctober 9, 2012 0:31
DocComments/Phobos/StdXmlMay 19, 2012 2:12
DocComments/Phobos/StdOutbufferMarch 7, 2012 20:25
DocComments/Phobos/StdAlgorithmOctober 29, 2010 3:15
DocComments/Phobos/StdFileSeptember 12, 2010 12:48
DocComments/Phobos/StdNumericSeptember 7, 2010 11:15
DocComments/Phobos/StdMd5September 7, 2010 10:44
DocComments/Phobos/StdGetoptSeptember 20, 2008 17:03
DocComments/Phobos/StdThreadAugust 27, 2008 10:21
DocComments/Phobos/StdDateAugust 20, 2008 8:43
DocComments/Phobos/ObjectAugust 15, 2008 3:45
DocComments/Phobos/StdHiddenfuncMarch 28, 2008 14:03
DocComments/Phobos/StdFormatMarch 17, 2008 15:05
DocComments/Phobos/StdComplexFebruary 20, 2008 18:00
DocComments/Phobos/StdIteratorFebruary 20, 2008 17:48
DocComments/Phobos/StdSlistFebruary 20, 2008 17:46
DocComments/Phobos/StdMathNovember 30, 2007 21:43
DocComments/Phobos/StdSystemNovember 30, 2007 21:40
DocComments/Phobos/StdTraitsNovember 30, 2007 21:33
DocComments/Phobos/StdVariantNovember 30, 2007 21:30
DocComments/Phobos/StdStringNovember 30, 2007 21:28
DocComments/Phobos/StdContractsNovember 30, 2007 21:23
DocComments/Phobos/StdBitarrayNovember 30, 2007 17:30
DocComments/Phobos/StdRandomNovember 29, 2007 20:07
DocComments/Phobos/StdWindowsCharsetNovember 29, 2007 19:11
DocComments/Phobos/StdFunctionalNovember 29, 2007 19:07
DocComments/Phobos/StdUriNovember 29, 2007 19:05
DocComments/Phobos/StdUniNovember 29, 2007 19:02
DocComments/Phobos/StdTypeTupleNovember 29, 2007 18:56
DocComments/Phobos/StdBindNovember 29, 2007 16:21
DocComments/Phobos/StdCpuidNovember 29, 2007 16:10
DocComments/Phobos/StdCtypeNovember 29, 2007 16:06
DocComments/Phobos/StdCoverNovember 29, 2007 16:02
DocComments/Phobos/StdDemangleNovember 29, 2007 15:55
DocComments/Phobos/StdCompilerNovember 29, 2007 15:44
DocComments/Phobos/StdConvNovember 2, 2007 16:51
DocComments/Phobos/StdPathOctober 16, 2007 22:53
DocComments/Phobos/StdBoxerOctober 16, 2007 22:11
DocComments/Phobos/StdCWindowsSeptember 6, 2007 16:49
DocComments/Phobos/StdStreamMay 1, 2007 19:30
DocComments/Phobos/StdCLocaleMarch 30, 2007 22:06
DocComments/Phobos/StdCStringMarch 20, 2007 15:27
DocComments/Phobos/StdCWcharMarch 20, 2007 14:20
DocComments/Phobos/StdCTimeMarch 20, 2007 14:20
DocComments/Phobos/StdCStdlibMarch 20, 2007 14:18
DocComments/Phobos/StdCStdioMarch 20, 2007 14:17
DocComments/Phobos/StdCStddefMarch 20, 2007 14:17
DocComments/Phobos/StdCStdargMarch 20, 2007 14:16
DocComments/Phobos/StdCProcessMarch 20, 2007 14:16
DocComments/Phobos/StdCMathMarch 20, 2007 14:15
DocComments/Phobos/StdCFenvMarch 20, 2007 14:14
DocComments/Phobos/StdCWindowsRegistryFebruary 14, 2007 7:29
DocComments/Phobos/StdMetastringsFebruary 7, 2007 6:39
DocComments/Phobos/StdRegexpJanuary 22, 2007 22:53
DocComments/Phobos/StdReclsJanuary 22, 2007 18:57
DocComments/Phobos/StdZlibJanuary 22, 2007 18:56
DocComments/Phobos/StdZipJanuary 22, 2007 18:54
DocComments/Phobos/StdSignalsJanuary 22, 2007 18:48
DocComments/Phobos/StdGcJanuary 18, 2007 23:12
DocComments/Phobos/StdOpenrjNovember 15, 2006 1:30
DocComments/Phobos/StdUtfMay 8, 2006 20:55
DocComments/Phobos/StdBase64March 14, 2006 17:58
DocComments/Phobos/StdCstreamJanuary 6, 2006 8:55
DocComments/Phobos/StdStdintJanuary 6, 2006 8:53
DocComments/Phobos/StdSocketstreamJanuary 6, 2006 8:52
DocComments/Phobos/StdSocketJanuary 6, 2006 8:52
DocComments/Phobos/StdMmfileDecember 29, 2005 19:57
DocComments/Phobos/StdIntrinsicDecember 29, 2005 19:54



FrontPage | News | TestPage | MessageBoard | Search | Contributors | Folders | Index | Help | Preferences | Edit

Edit text of this page (date of last change: March 7, 2012 20:25 (diff))