Last update May 1, 2007

Doc Comments / Phobos /
Std Stream


Add your comments here...


I'm trying to use TArrayStream and it gives me a linker error.

Use MemoryStream instead. It has a constructor that takes a char[] even though I notice that isn't listed in the doc. I will send Walter a update for that.

The error using TArrayStream is probably due to building in debug mode but linking against a non-debug build of phobos. So I'll probably remove TArrayStream from the doc since it is a pain to work with (you must pass -release to dmd). Either that or needs to include debug and non-debug builds of phobos.

(adapted from NG:digitalmars.D/19743 by BenHinkle)

ungetc supports ungetc, which pushes a character back by maintaining an array of pushed-back characters. Right now only the text functions check this array for content, though. I think the idea was that if one is storing text and binary data mixed together that the text are stored with writeString which puts a length byte followed by the text.

(from NG:digitalmars.D/8940)


You can probably use readf almost like scanf, there is one difference that you must note though. scanf returns EOF at the end of file, readf always returns 0 if it didn't read any elements.


Corresponding page in the D Specification

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

Edit text of this page (date of last change: May 1, 2007 19:30 (diff))