Back again...
As an introductory tutorial, I'm now using:
http://www.dsource.org/projects/tutorials/wiki/InitializingVariablesExample
BTW, somebody fix that page - the `writefln' statements are missing
the %d and %s.
char[] password = "sesame";
didn't work on my MacOS X box. Why?
[sidebar]
Why is every D tutorial I've touched upon so far, been frigged up?
This is NOT good advocacy, people! Bad advertising! Where is the good
stuff hiding? L8r...
--
duke

IIRC you are using D2 and that only work for D1, for D2 I think you need
to do:
string password = "sesame";
This has something to do with the const system. I do know there is no way
to safely modify a char[] set from a string literal so D2 forcing you to
use const (or immutable, I forget what's used) for this case fixes a hole
in D1.
--
... <IXOYE><

Maybe you're using d2, which types string literals differently than d1?
rewrite to
string password = "sesame";
Or maybe you attempted to modify the contents of password, which
shouldn't be done for d1 or d2.
rewrite to
char[] password = "sesame".dup;

[sidebar]
Why is every D tutorial I've touched upon so far, been frigged up?
This is NOT good advocacy, people! Bad advertising! Where is the good
stuff hiding? L8r...

Good question. I really can't think of any tutorials I used when I was
learning D, past the spec and compiler sources. And the tango book.
I bet Andrei's book will fit the bill nicely. I rather like his writing
style, in spite of all the puns.

Back again...
As an introductory tutorial, I'm now using:
http://www.dsource.org/projects/tutorials/wiki/InitializingVariablesExample
BTW, somebody fix that page - the `writefln' statements are missing
the %d and %s.
char[] password = "sesame";
didn't work on my MacOS X box. Why?
[sidebar]
Why is every D tutorial I've touched upon so far, been frigged up?
This is NOT good advocacy, people! Bad advertising! Where is the good
stuff hiding? L8r...

Yeah. It's an advertising disaster. Basically because just about every
tutorial in existence is a D1 tutorial, and many of them don't even
state that. And I think that very soon, most of the interest will be in D2.
OTOH, Andrei's book is excellent.

As others have said, in D2, strings are immutable by default, so
string password = "sesame";
or
immutable(char)[] password = "sesame";
Would be the correct way.

[sidebar]
Why is every D tutorial I've touched upon so far, been frigged up?
This is NOT good advocacy, people! Bad advertising! Where is the good
stuff hiding? L8r...

One of the reasons probably is the D1/D2 schism. D1 was, in a way, a
hastily chosen point at which to call the language stable. Because
it has been a stable version of the language for three years, D1 has
been the subject of most tutorials, while D2 has been a moving target
and thus any tutorial written for it would soon be outdated.
Hopefully, this situation will change as D2 becomes more stable (it
actually is fairly stable already).
--
Simen

Why is every D tutorial I've touched upon so far, been frigged up?
This is NOT good advocacy, people! Bad advertising! Where is the good
stuff hiding? L8r...

One of the reasons probably is the D1/D2 schism. D1 was, in a way, a
hastily chosen point at which to call the language stable. Because
it has been a stable version of the language for three years, D1 has
been the subject of most tutorials, while D2 has been a moving target
and thus any tutorial written for it would soon be outdated.
Hopefully, this situation will change as D2 becomes more stable (it
actually is fairly stable already).

We could wait a month or two, to let the dust settle and then have go at
cleaning tutorials?

Why is every D tutorial I've touched upon so far, been frigged up?
This is NOT good advocacy, people! Bad advertising! Where is the good
stuff hiding? L8r...

One of the reasons probably is the D1/D2 schism. D1 was, in a way, a
hastily chosen point at which to call the language stable. Because
it has been a stable version of the language for three years, D1 has
been the subject of most tutorials, while D2 has been a moving target
and thus any tutorial written for it would soon be outdated.
Hopefully, this situation will change as D2 becomes more stable (it
actually is fairly stable already).

We could wait a month or two, to let the dust settle and then have go at
cleaning tutorials?

Why is every D tutorial I've touched upon so far, been frigged up?
This is NOT good advocacy, people! Bad advertising! Where is the
good stuff hiding? L8r...

One of the reasons probably is the D1/D2 schism. D1 was, in a way, a
hastily chosen point at which to call the language stable. Because
it has been a stable version of the language for three years, D1 has
been the subject of most tutorials, while D2 has been a moving
target
and thus any tutorial written for it would soon be outdated.
Hopefully, this situation will change as D2 becomes more stable (it
actually is fairly stable already).

We could wait a month or two, to let the dust settle and then have go
at cleaning tutorials?

I'll see you guys in 6 months - maybe 12.

Or we could start beating on them now. I'd guess that would get things fixed
sooner even with having to go back and refix anything that changes in the
interim.
I'd offer but my writing sucks and my free time situation is even worse.
--
... <IXOYE><

Back again...
As an introductory tutorial, I'm now using:
http://www.dsource.org/projects/tutorials/wiki/InitializingVariablesExample
BTW, somebody fix that page - the `writefln' statements are missing
the %d and %s.
char[] password = "sesame";
didn't work on my MacOS X box. Why?
[sidebar]
Why is every D tutorial I've touched upon so far, been frigged up?
This is NOT good advocacy, people! Bad advertising! Where is the good
stuff hiding? L8r...

Almost all tutorials have been written for D1.x and most of those
probably in the early years. I suggest you sign up for an account and
modify the examples that give you problems.
For writefln, I believe D1.x did not reqire a %s (also writeln didn't
exist). And for this example %s for both would be perfectly fine and the
correct method.
The issue with char[] password = "sesame"; is what has already been
said. Both of these forms will work in D1.x and D2.x
auto password = "sesame";
string password = "sesame";
D1.x has an alias for string to char[] and D2.x has an alias to
immutable(char)[]
Important changes from 1.x to 2.x are found on this page:
http://digitalmars.com/d/2.0/features2.html
Another issues you might run into for the examples are 'inout'
parameters ('ref' works in both versions)