Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
a local clone.
auto and typeof Solutions
auto
and typeof
Dersi Problem Çözümleri
We can use typeof
to determine the type of the literal and .stringof
to get the name of that type as string
:
import std.stdio; void main() { writeln(typeof(1.2).stringof); }
The output:
double
Copyright © 1999-2025 by the D Language Foundation | Page generated by
Ddoc on Sun Aug 24 07:18:01 2025