probe1.dhover×35all
import 
(package) std
std
.
(module) std.stdio
Category Symbols
File handles _popen File isFileHandle openNetwork stderr stdin stdout
Reading chunks lines readf readfln readln
Writing toFile write writef writefln writeln
Misc KeepTerminator LockType StdioException

Standard I/O functions that extend core.stdc.stdio. core.stdc.stdio is publically imported when importing std.stdio.

There are three layers of I/O:

  1. The lowest layer is the operating system layer. The two main schemes are Windows and Posix.

  2. C's stdio.h which unifies the two operating system schemes.

  3. std.stdio, this module, unifies the various stdio.h implementations into a high level package for D programs.

Source

std/stdio.d

@copyrightCopyright The D Language Foundation 2007-.@licenseBoost License 1.0.@authorsWalter Bright, Andrei Alexandrescu, Alex Rønne Petersen
stdio
;
enum
(alias) object.string = string
string
(constant) string probe1.where!("\n a\n b\n ", "/home/runner/work/sparkles/sparkles/docs/research/ui-authoring/experiments/ui-api-demo-markup/probes/probe1.d", 27LU) = "enum __w = \"/home/runner/work/sparkles/sparkles/docs/research/ui-authoring/experiments/ui-api-demo-markup/probes/probe1.d\"; enum __l = 27LU;"
where
(string src, string file = __FILE__, size_t line = __LINE__) = "enum __w = \"" ~
(constant) string probe1.file = "/home/runner/work/sparkles/sparkles/docs/research/ui-authoring/experiments/ui-api-demo-markup/probes/probe1.d"
file
~ "\"; enum __l = " ~
(constant) ulong probe1.line = 27LU
line
.
(constant) string 27LU.stringof = "27LU"
stringof
~ ";";
template
(template) probe1.Loc(string f = __FILE__, ulong l = __LINE__)
Loc
(string f = __FILE__, size_t l = __LINE__) { enum
(constant) probe1.Loc(string f = __FILE__, ulong l = __LINE__) = l
Loc
= l; }
void
void probe1.apply(scope void delegate(int ui) pure nothrow @nogc @safe dg) pure nothrow @nogc @safe
apply
(scope void delegate(int
(parameter) int ui
ui
) @safe pure nothrow @nogc
(parameter) void delegate(int ui) pure nothrow @nogc @safe dg
dg
) @safe pure nothrow @nogc {
(parameter) void delegate(int ui) pure nothrow @nogc @safe dg
dg
(1); }
void
void probe1.f(int ui) pure nothrow @nogc @safe
f
(int
(parameter) int ui
ui
) @safe pure nothrow @nogc
{ int
(local variable) int local
local
= 3;
scope
(local variable) void delegate(int ui) pure nothrow @nogc @safe dg
dg
= delegate (int
(parameter) int ui
ui
) @safe pure nothrow @nogc { cast(void) (
(parameter) int ui
ui
+
(local variable) int local
local
); };
(local variable) void delegate(int ui) pure nothrow @nogc @safe dg
dg
(2);
void probe1.apply(scope void delegate(int ui) pure nothrow @nogc @safe dg) pure nothrow @nogc @safe
apply
(delegate (int
(parameter) int ui
ui
) @safe pure nothrow @nogc { cast(void) (
(parameter) int ui
ui
+
(local variable) int local
local
); });
int
(local variable) int body
body
= 1;
} void
void probe1.g()
g
()
{ mixin("struct A1 {}"); pragma(msg, "plain mixin: ", __traits(getLocation, A1)); mixin("\n\nstruct A2 {}"); pragma(msg, "mixin line 3: ", __traits(getLocation, A2)); mixin("#line 100 \"app.d\"\n struct A3 {}"); pragma(msg, "with #line: ", __traits(getLocation, A3)); struct
(struct) probe1.g.Here
Here
{}
pragma(msg, "after: ", __traits(getLocation, Here)); pragma(msg, "fn: ", __FUNCTION__); mixin(
(template instance) probe1.where!("\n a\n b\n ", "/home/runner/work/sparkles/sparkles/docs/research/ui-authoring/experiments/ui-api-demo-markup/probes/probe1.d", 27LU)
where
!q{
a b }); pragma(msg, "where: ", __w, " ", __l); pragma(msg, "parent: ", __traits(identifier, __traits(parent, Here))); auto
(local variable) void delegate() pure nothrow @nogc @safe x
x
= delegate () { struct
(struct) probe1.g.__dgliteral_L33_C14.In
In
{} pragma(msg, "in lambda parent: ", __traits(identifier, __traits(parent, In)), " fn=", __FUNCTION__); };
auto
(local variable) void delegate(int a = __LINE__) pure nothrow @nogc @safe y
y
= delegate (int
(parameter) int a
a
= mixin("__LINE__")) { };
} void
void D main()
main
() {
void probe1.g()
g
(); }