jcc7
Joined: 22 Feb 2004 Posts: 657 Location: Muskogee, OK, USA
|
Posted: Mon May 16, 2005 11:26 am Post subject: Tutorials are currently read-only |
|
|
The new dsource server is running PostgreSQL rather than MySQL, so some changes have been required to get the tutorials running. Brad has already fixed it so that the current examples are displayed, but adding new ones (and allowing me to edit the existing ones) is a different story.
I've just installed PostgreSQL (and Apache2 and PHP5), but I guess I also need to get the authorization system installed on my test machine too. And I haven't actually tested that my installation of PHP is set up to work with my Apache server. So it's going to take a little time to get my system configured so I can help Brad solve these issues.
Hopefully, we'll get everything sorted out pretty soon, but until then you can post a topic in this forum for any corrections/additions that you have to offer and we'll update the tutorial page as soon as we can.
E.g., here's what I'd add if I could: Code: | /* Example Name: Unittest within a class */
/* Category: Intermediate */
/* Description: You can test a class within the same class with a unittest. */
class Sum
/*
based on http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D.learn/826
see also http://www.digitalmars.com/d/class.html
*/
{
int add(int x, int y) { return x + y; }
unittest
/* To try the unittest, compile with "dmd myclass.d -unittest" and then run the executable. */
{
Sum s = new Sum(); /* remember to "new" it. */
assert(s.add(3,4) == 7);
assert(s.add(-2,0) == -2);
}
}
int main(char[][] argv)
{
return 0;
} |
|
|