Don't forget to bookmark the errata page:
http://erdani.com/tdpl/errata/index.php?title=Main_Page ;)
On 12/16/10, Chris A wrote:
> Hmm... maybe my compiler was out of date. I downloaded DMD again and tried
> your code, and it seems to build fine now.
>
> Sorry for the trouble then, thank you for
Hmm... maybe my compiler was out of date. I downloaded DMD again and tried
your code, and it seems to build fine now.
Sorry for the trouble then, thank you for setting me on the right path Andrej.
Andrej Mitrovic Wrote:
> This works fine for me:
>
> import std.stdio;
> import std.string;
This works fine for me:
import std.stdio;
import std.string;
void main(string[] args)
{
uint[string] freqs;
foreach(lines; stdin.byLine()) {
foreach(word; split(strip(lines))) {
++freqs[word.idup];
}
}
foreach(key, v
Hey all, I'm going over some examples in Alexandrescu's book, but I guess
something has changed in the language because the example isn't working for me.
The simple example:
void main(string[] args)
{
uint[string] freqs;
foreach(lines; stdin.byLine()) {
foreach(wo
> I'm curious, why do you need that?
>
It is a long story.
But basically I am creating a platform wherein the users would be
deriving classes from some base classes that I write as part of the
platform. And the users would often be deriving many such classes.
The end-users would often not be pro
d coder wrote:
Greetings
I need a way to know (using traits or other compile time constructs)
all the types derived from a given type.
Is it possible in D?
No.
Is it possible to get a list of all the user-defined classes? I could
use that to filter out the classes that I need.
No.
Howe
On 12/16/2010 02:16 PM, d coder wrote:
Greetings
I need a way to know (using traits or other compile time constructs)
all the types derived from a given type.
Is it possible in D?
Is it possible to get a list of all the user-defined classes? I could
use that to filter out the classes that I nee
V Thu, 16 Dec 2010 18:46:41 +0530, d coder wrote:
> Greetings
>
> I need a way to know (using traits or other compile time constructs) all
> the types derived from a given type. Is it possible in D?
>
> Is it possible to get a list of all the user-defined classes? I could
> use that to filter ou
Greetings
I need a way to know (using traits or other compile time constructs)
all the types derived from a given type.
Is it possible in D?
Is it possible to get a list of all the user-defined classes? I could
use that to filter out the classes that I need.
Regards
Cherry
Jonathan M Davis wrote:
Maybe I'm just totally missing something, but this seems really wrong to me.
This program:
import std.stdio;
void main()
{
writeln(2.1);
writeln(2.1 == 2.1);
writeln(3 * .7);
writeln(2.1 == 3 * .7);
auto a = 2.1;
auto b = 3 * .7;
writeln(a);
Maybe I'm just totally missing something, but this seems really wrong to me.
This program:
import std.stdio;
void main()
{
writeln(2.1);
writeln(2.1 == 2.1);
writeln(3 * .7);
writeln(2.1 == 3 * .7);
auto a = 2.1;
auto b = 3 * .7;
writeln(a);
writeln(b);
write
11 matches
Mail list logo