From: ajps AT mail DOT telepac DOT pt (aperes) Newsgroups: comp.os.msdos.djgpp Subject: it's amazing (at least for me) Date: Sat, 10 Jul 1999 08:05:20 GMT Lines: 34 Message-ID: <378618ca.3495674@news.telepac.pt> NNTP-Posting-Host: 194.65.167.163 X-Newsreader: Forte Free Agent 1.11/32.235 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com In this little C program if i change the type of variable k (in setup function) to byte the program don't work. Can anyone explain me why? Thanks APeres. ------------------------------------------------------------------------------------ typedef unsigned char byte; typedef unsigned char pallette[256][3]; void setup(pallette); int main(void) { int i; pallette pall; setup(pall); for(i=0; i < 256; i++) printf("%d ------- %d\n", i, pall[i][0]); return 1; } void setup(pallette pall) { int k; for(k=0; k < 256; k++) pall[k][0] = pall[k][1] = pall[k][2] = i; }