www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/08/18/20:12:24

Message-ID: <37BB2B5C.3428472C@sympatico.ca>
From: websurfr <websurfr AT sympatico DOT ca>
X-Mailer: Mozilla 4.61 [en] (Win98; I)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Error in this? Please reply.
References: <37B9F16F DOT 8605AC4B AT sympatico DOT ca> <18467 DOT 990818 AT minsk DOT lug DOT net>
Lines: 85
Date: Wed, 18 Aug 1999 21:51:21 GMT
NNTP-Posting-Host: 209.226.93.211
X-Trace: news20.bellglobal.com 935013081 209.226.93.211 (Wed, 18 Aug 1999 17:51:21 EDT)
NNTP-Posting-Date: Wed, 18 Aug 1999 17:51:21 EDT
Organization: Sympatico
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Yeah, I got it two days ago hehe..

Websurfr

Alexander Bokovoy wrote:

> On 18.08.1999, websurfr wrote:
>
> > Hello everybody, I'm running DJGPP v.2 with a bunch of other files and
> > the following code gives the following error:
>
> > C:\c\modez.c: In function 'main':
> > C:\c\modez.c:36: parse error before `for'
> > C:\c\modez.c:36: parse error before `)'
> > C:\c\modez.c:37: parse error before `)'
> > C:\c\modez.c:21: warning: return type of `main' is not `int'
> You've forgot to place ';' in order to finish the previous statement:
> > // fill the screen with dark grey
>
> > Fill_Screen_Z(8)
> Right is:
>
> Fill_Screen_Z(8);
>                 ^--- see difference.
> > -------------------------------------------------------------------------------------
>
> > // MODEZ.C - A demo of mode Z (320x400x256)
>
> > // I N C L U D E S
> > /////////////////////////////////////////////////////////////////////////
>
> > #include <io.h>
> > #include <conio.h>
> > #include <stdio.h>
> > #include <stdlib.h>
> > #include <dos.h>
> > #include <bios.h>
> > #include <fcntl.h>
> > #include <memory.h>
> > #include <malloc.h>
> > #include <math.h>
> > #include <string.h>
>
> > #include <black3.h>
>
> > // MAIN
> > ////////////////////////////////////////////////////////////////////////////////////
>
> > void main(int argc, char **argv)
> > {
> > int index,           // loop variables
> >      x, y,
> >      color;          // holds the current color
>
> > // set the graphics mode to mode Z 320x400x256
>
> > Set_Mode_Z();
>
> > // fill the screen with dark grey
>
> > Fill_Screen_Z(8)
>
> > // plot 1000 pixels in each of the colors
>
> > for (color=1; color<256; color++)
> >      for (index=0; index<1000; index++)
> >           Write_Pixel_Z(rand()%320,rand()%400,color);
>
> > // wipe screen
>
> > for (index=320; index>=0; index--)
> >      for (y=0; y<400; y++)
> >           Write_Pixel_Z(index,y,0);
>
> > // restore the video system to text
>
> > Set_Graphics_Mode(TEXT_MODE);
>
> > } // end main
>
> > P.S Thanks in advance.
>
> Best regards,
>  Alexander <bokovoy AT minsk DOT lug DOT net>

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019