Message-ID: <20000823033329.9373.qmail@web515.mail.yahoo.com> Date: Tue, 22 Aug 2000 20:33:29 -0700 (PDT) From: Chris Amos Subject: Re: Hello all. Im a new DJGPP user... To: djgpp AT delorie DOT com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Reply-To: djgpp AT delorie DOT com Heres my first program. Tell me what you think, if there are any structure errors or whatever. I dont think there are, but then again. Im just a newbie... P.S.> Sorry about the Word wrap. :( -------- USING DJGGP/ALLEGRO FOR DOS -------- // Program by Twisted Matrix - My first graphical c program... // Uses ALLEGRO and the DJGPP compiler #include // Which of these i acually use in this program #include // is beyond me. Heh heh. I know i use Allegro.h. :) #include main() { int x=0; /* Lets define some local variables */ int col=0; /* Everyone loves integers! :) */ /* Initiate the Allegro library for use in this program */ allegro_init(); install_keyboard(); set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0); /* Lets draw the 256 color palette shall we... */ for (x=0; x<639; x++) { col++; if (col>255) { col=0; } vline(screen, x, 0, 479, col); } /* Now lets write a message on the screen and wait for a key press. */ textout_centre(screen, font, "My first c program using DJGPP/ALLEGRO", 320, 230, 15); textout_centre(screen, font, "By: Twisted Matrix (Homie_dont_play_dat AT Yahoo DOT com)", 320, 240, 15); readkey(); return 0; // Can anyone tell me whats so special about 0? Why 0? // I mean, whats so special about it? Is is an exit code of // some kind? Can i use any number I want or none at all? // How about return 69; or return; ? Would those work? } ===== ~ Twisted Matrix (Founder of ULTRATECH) URL: http://www.stas.net/ultratech Yahoo ID: Homie_dont_play_dat, ICQ: 74628745 AOL im: TwistedMatrix __________________________________________________ Do You Yahoo!? Yahoo! Mail - Free email you can access from anywhere! http://mail.yahoo.com/