FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Tutorials are currently read-only

 
Post new topic   Reply to topic     Forum Index -> Tutorials
View previous topic :: View next topic  
Author Message
jcc7



Joined: 22 Feb 2004
Posts: 657
Location: Muskogee, OK, USA

PostPosted: Mon May 16, 2005 11:26 am    Post subject: Tutorials are currently read-only Reply with quote

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;
}
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Tutorials All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group